load balancing of pub/sub no working as expected
Hello!
in the docs (https://github.com/socketstream/socketstream/blob/master/doc/guide/en/pub_sub_events.md#event-transports) I read
"The SocketStream Pub/Sub system has been designed from the ground up with horizontal scalability and high-throughput in mind. The all and channel commands will be automatically load-balanced across all SocketStream servers when an external event transport is used.
This sounds great, but I am experiencing very unexpected results when I let two node instances run on the same server sharing the redis transport. I in fact end up with a scenario where each nodejs server sends all channel messages to all connected clients. I thought the idea was that each nodejs server only sends messages to the sessions it is responsible for. Please point me to where I am doing things wrongly...
Here is the the part where I tell my node app to use the redis transport:
ss.session.store.use( 'redis', scope.serverConf.redis_ss );
ss.publish.transport.use('redis', scope.serverConf.redis_ss);
scope.serverConf.redis_ss is something like:
redis_ss : {
host: 'localhost',
port: 6379,
db: 4
},
Hi luksch,
Let me take a look at this tonight. I've had to do some critical work in the past week which sucked the life out of me, but I should be around to sort it out tonight.
Regards,
Paul Jensen
On Wednesday, January 29, 2014, luksch [email protected] wrote:
Hello!
in the docs ( https://github.com/socketstream/socketstream/blob/master/doc/guide/en/pub_sub_events.md#event-transports) I read
"The SocketStream Pub/Sub system has been designed from the ground up with horizontal scalability and high-throughput in mind. The all and channel commands will be automatically load-balanced across all SocketStream servers when an external event transport is used.
This sounds great, but I am experiencing very unexpected results when I let two node instances run on the same server sharing the redis transport. I in fact end up with a scenario where each nodejs server sends all channel messages to all connected clients. I thought the idea was that each nodejs server only sends messages to the sessions it is responsible for. Please point me to where I am doing things wrongly...
Reply to this email directly or view it on GitHubhttps://github.com/socketstream/socketstream/issues/429 .
Hi Luksch,
Sorry I didn't address this last night. I'm here now. Could you provide some more information?
When you say "where each nodejs server sends all channel messages to all connected clients", could you let me know these bits:
1 - What kind of message you are sending "ss.publish.all", or on a specific channel that some clients are subscribed to.
2 - Could you execute these commands, and then send the output from that command when you see this unexpected behaviour?
redis-cli
> MONITOR
3 - You say that you have 2 node instances on the same server. Are they using clustering, or are they both running independently?
Thanks. We'll figure out what's going on and then resolve it.
Here is my findings so far:
I start both nodejs processes on localhost (one lisening on port 3000, the other on 3001) and connect to localhost:3001 with my browser.
about 1
I send the messages in question over a channel with the name "arbChannel". Here is the call:
ss.publish.channel('arbChannel','arbs:update', arbvestorMessage );
arbvestorMessage is a json object. A client is subscribed to this channel on login via a rpc call, so we have a req object against which we work:
req.session.channel.subscribe( 'arbChannel' );
about 2
All is peachy, if only one nodejs process runs. The MONITOR command on the redis-cli shows messages like this:
login
redis 127.0.0.1:6379> MONITOR
OK
1391615455.171368 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615455.412123 [4 127.0.0.1:44512] "setex" "sess:EAQrohplPzY/MgLvn4MJtGvy" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"plan\":{\"plan\":2,\"beta\":false},\"userLogin\":\"testnorm1\",\"orderId\":469,\"channels\":[],\"userId\":117}"
1391615455.412532 [4 127.0.0.1:44512] "setex" "sess:EAQrohplPzY/MgLvn4MJtGvy" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"plan\":{\"plan\":2,\"beta\":false},\"userLogin\":\"testnorm1\",\"orderId\":469,\"channels\":[\"EAQrohplPzY/MgLvn4MJtGvy\"],\"userId\":117}"
1391615455.922505 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.003483 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.251686 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.251831 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.261957 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.274368 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.275713 [4 127.0.0.1:44512] "get" "sess:EAQrohplPzY/MgLvn4MJtGvy"
1391615456.576214 [4 127.0.0.1:44512] "setex" "sess:EAQrohplPzY/MgLvn4MJtGvy" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"plan\":{\"plan\":2,\"beta\":false},\"userLogin\":\"testnorm1\",\"orderId\":469,\"channels\":[\"EAQrohplPzY/MgLvn4MJtGvy\",\"arbChannel\"],\"userId\":117}"
1391615456.940817 [4 127.0.0.1:44512] "setex" "sess:EAQrohplPzY/MgLvn4MJtGvy" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"plan\":{\"plan\":2,\"beta\":false},\"userLogin\":\"testnorm1\",\"orderId\":469,\"channels\":[\"EAQrohplPzY/MgLvn4MJtGvy\",\"arb:21945169\"],\"userId\":117}"
1391615457.019415 [4 127.0.0.1:44512] "setex" "sess:EAQrohplPzY/MgLvn4MJtGvy" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"plan\":{\"plan\":2,\"beta\":false},\"userLogin\":\"testnorm1\",\"orderId\":469,\"channels\":[\"EAQrohplPzY/MgLvn4MJtGvy\",\"arb:21945169\",\"arbChannel\"],\"userId\":117}"
...
then a message is sent:
1391615710.489735 [4 127.0.0.1:44516] "publish" "ss:event" "{\"t\":\"channel\",\"channels\":[\"arbChannel\"],\"e\":\"arbs:update\",\"p\":[{\"timeStamp\":1391615710489,\"...
start of new nodejs process on other port:
1391615842.976420 [0 127.0.0.1:46489] "info"
1391615842.979186 [0 127.0.0.1:46489] "select" "4"
1391615842.979269 [4 127.0.0.1:46489] "select" "4"
1391615842.979646 [0 127.0.0.1:46493] "info"
1391615842.979768 [0 127.0.0.1:46494] "info"
1391615842.980443 [0 127.0.0.1:46493] "select" "4"
1391615842.980796 [0 127.0.0.1:46494] "select" "4"
1391615842.980942 [4 127.0.0.1:46494] "subscribe" "ss:event"
now an update looks like this
1391615865.849659 [4 127.0.0.1:44516] "publish" "ss:event" "{\"t\":\"channel\",\"channels\":[\"arbChannel\"],\"e\":\"arbs:update\",\"p\":[{\"timeStamp\":1391615865848,\"...
1391615865.939475 [4 127.0.0.1:46493] "publish" "ss:event" "{\"t\":\"channel\",\"channels\":[\"arbChannel\"],\"e\":\"arbs:update\",\"p\":[{\"timeStamp\":1391615865938,\"...
Both messages reach the client that is connected to the first nodjs process on port 3001
about 3
The second nodejs instance runs independently. It runs on a port that can only be reached via tunneling and loads a different run configuration. It is basically a staging area to test out things before deploying. Since we run on live data which is conveniently available on the production server we decided to go this route. most of the time the staging area nodejs process does not serve any clients. If i connect to the nodejs server on port 3000 i also get two messages, one from each nodejs process.
any news?
Hi Luksch,
Sorry for not replying earlier, work was very busy before I took my holiday (which I'm on now). I'm looking at it right now. I've got a repo here:
https://github.com/socketstream/test-429
What I'm going to do is replicate what you're doing, and then debug it.
Hi,
I've pushed some updates to that repo. I would like it to effectively replicate what was going on in your case. It's not yet finished (it's causing on error on the client), but once it's done I will check with you if it replicates the issue that you're encountering.
I'm sorry about how long it's taken to get back to you on all of this.
Hello Paul. The issue persists for us. I will try to see into the test repo to see if maybe i can reproduce our server behavior. I dealt with it so far by simply turning all node instances off on the server. So far we have only a moderate customer base and all testing is done again on local machines, so it is not a matter of death or life. Still, the issue is very troublesome, if you think about it.
Hi @luksch,
I managed to replicate the issue that you described. In the test-429 repo, the node app is setup to use Redis, and the app runs on port 3000, and you can make it run on another port by passing a PORT=3001 env variable before running it on the command line.
What I did was run 2 instances of the app (ports 3000 and 3001), and have the client code subscribe to a channel and publish a message if the client was on port 3001. I then had the client log out any channel messages and data sent.
What I found was that both web pages for 3000 and 3001 received the channel events and data, even though only the client on port 3001 was supposed to receive them.
Thank you for bringing this bug to my attention, and I'm very sorry that I haven't addressed it sooner. I'm going to ascertain where in the stack the error is occurring, and fix this ASAP.
I am glad that you could reproduce the issue finally. As I said, we were able to work around this in the past but it gives me definitively a much better feeling to know that you will address the issue.
Hi @luksch,
I've looked closer into this issue, and determined what is going on with it.
An important question - did you use the same web browser to view the app on ports 3000 and 3001?
I did this, and when I used MONITOR in Redis and replicated the test, I realised that the session id across ports 3000 and 3001 were using the same session id. The sequence of events:
- Boot the app instances
- Load localhost:3000 on Chrome, you see this in Redis's MONITOR output:
1397668855.297857 [4 127.0.0.1:49617] "get" "sess:QZjauOQjvk+KQJSgajKU35Af"
1397668855.315888 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.460099 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.631572 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.651987 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.657819 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.663204 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.664853 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.682862 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.684663 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.752127 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.754217 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.825633 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.825706 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397668855.850876 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668855.851917 [4 127.0.0.1:49617] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668856.286425 [4 127.0.0.1:49617] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
- Load localhost:3001 on Firefox, you see this in Redis's MONITOR output:
1397668940.799253 [4 127.0.0.1:49620] "get" "sess:hGLo9zc24UVq5SrtPLPWh2Ng"
1397668940.819681 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.023671 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.030047 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.032372 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.037014 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.039049 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.039912 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.046075 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.047053 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.047944 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.050092 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.054008 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.056990 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.063100 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.064955 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397668941.405076 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.493249 [4 127.0.0.1:49620] "get" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI"
1397668941.501983 [4 127.0.0.1:49620] "setex" "sess:kw+KJ/9V9j/UtKb/z6d9CnRI" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"channels\":[\"arbChannel\"]}"
Take a look at the values around sess:. You'll notice that they're different IDs.
Now...
- Load localhost:3001 on Chrome, you see this in Redis's MONITOR output:
1397669085.636825 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.657687 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.775757 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.778843 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.845790 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.868078 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.869567 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.871450 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.873816 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.876063 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.886307 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.888882 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.912369 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.923943 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669085.940766 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669085.945730 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"}}"
1397669086.567125 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669086.631212 [4 127.0.0.1:49620] "get" "sess:UpImTLP5vsBvoEdVSRO8qcCL"
1397669086.643265 [4 127.0.0.1:49620] "setex" "sess:UpImTLP5vsBvoEdVSRO8qcCL" "86400" "{\"cookie\":{\"originalMaxAge\":null,\"expires\":null,\"secure\":false,\"httpOnly\":false,\"path\":\"/\"},\"channel\":{},\"channels\":[\"arbChannel\"]}"
Notice that the sess: value for localhost:3001 is the same as the one on localhost:3000. Also notice how the session is now marked as having a channel subscription to 'arbChannel'?
This is what is happening.
Is this a bug? Yes and No.
No, because on the one hand, both servers see the same session id, and both read/write to the same data source, hence being able to horizontally scale the web app instances whilst have them writing to the same data source.
On the other hand, yes, this is a bug. Do you want to have the same session id for localhost:3000 and localhost:3001? I imagine in your case not. This is what I need to look into further, because it's not straightforward to developers that this is what is happening, or what they wanted.
In the end I want two (or more) node processes behind HA proxy serving my customers. I am fine with configuring sticky sessions, but that should really result in ONE session per client that ONE node process answers to. A message sent to all clients should only concern the very clients a node process is attached to.
If that is not possible, what would be the correct way out of this? How can I make sure that my clients don't receive the same message from each node process? Or do I need to have to make sure that only one node process actually sends out update messages to all clients? In this case I need to make sure, that I load balance the outgoing messages myself outside of ha-proxy. Not really nice...
I understand, that you argue that this is not really a bug, but I really don't see the use case of this behaviour.
I will look into this again in more detail and answer your other questions.
Regards, Lukas
Hi @luksch,
I'd like to pick this up again. Since we last spoke, I finished working at Axisto and started a company. I'm currently doing some client work as part of the new company.
To briefly explain the problem that you ran into, it looks like the trying to access a site on localhost:3000 and localhost:3001 returns the same session, hence both receive the same messages.
A potential way to work around this issue would be to try and access the site from say 127.0.0.1:3001, so that you don't see the same session.
I'm sorry that I've been off the radar for a couple of months. I had to serve 3 month's notice at my previous job, and I started work at a client site, taking over a rather large codebase with immediate issues to address and projects to begin. To say the least I've been inactive on matter regarding SocketStream.
Hi Paul!
Thanks for getting back to me. To be honest, we are looking hard into other options, i.e. moving away from socketstream as soon as we find time for the needed refactoring. Our project aims at end customers and involves AngularJs on the client side. Socketstream and AngularJs really are not getting along too well anyway, so the issue of not being able to scale horizontally as expected just adds to the already heavy arguments against socketstrem. Too bad for socketstream really, it did have great potential, and I just love the idea of having a nice pub/sub/rpc sub-system. Well, maybe you find time to get back into socketstream and all will be well. I keep my fingers crossed, since we will not have time to change base technologies like socketstream any time soon.
Lukas
I will have a look into this issue again.
What is the issue here ? Looking for more elaborate explanation of the technical situation.
I'll provide one later today, one I get a bit of time.
@luksch Where are you on this? I think this is the only issue with Socketstream that isn't being resolved.
In the moment I disabled the second node process. The load on our server is moderate enough so that only one process does the job well enough. Still, the issue remains serious, since this bug/feature/whatever prevents simple horizontal scaling. I still can't see the use case of the behavior as it is implemented right now. In what situation is it useful to publish to all sessions for a node instance, even to ones that are not handled by this instance? I just don't get the concept of this, but I may overlook something obvious...
Sorry to not be of much more help here, but i am very busy with other stuff right now.
That is fine. However I want to have a solid solution of this at a known and reasonable timescale. IMO the best solution is to write a set of tests for the scenarios that must work. Do we have a couple of months runway to get this figured out?
As you see, the issue is well over a year old already. Another two months will not be the end of the world. I am just happy to see that finally socketstream seems alive again. It is such a nice little framework and I would hate to see it die, although I can't put much time into it personally.