S
S
Sergey2014-05-21 21:38:59
Nginx
Sergey, 2014-05-21 21:38:59

publish–subscribe sharding

Connected nginx push stream module. Configured to work through websockets using channels. Now I want to distribute the load on several servers. But if I just proxy connections through web sockets, then the following situation will turn out, if I understand the mechanism correctly:
- some users will connect to server1 and listen to channel1 (which is created on server1)
- some users will connect to server2 and will listen to channel1* (which is created on server2)
- when an event occurs, it will be generated only by one of the servers to which the request was redirected and some of the subscribers will not see it.
Now, actually, a question. How is the load distributed when using websockets (and is it possible in my case)
In the scheme I described, it will be necessary to publish a message on all servers, web sockets are clogged on the balancer. In general, I get just a bunch of cons.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question