sticky-session

Scaling with sticky sessions and websockets

心已入冬 提交于 2019-12-03 07:32:34
Initially we have two AWS EC2 instances with node.js running behind a load balancer with sticky sessions. As the load increases more instances are added. But we are facing problems with this approach. As out application is mainly for workshops, the load usually increases within a short period of time (workshop start) and every workshop participant has a sticky session with the first two instances and the new ones have almost none. Because of this the performance stays bad. First thought was: let's disable the sticky sessions. But that destroys our websockets because they need sticky sessions

How to make sticky session works with socket.io (w/ or w/o pm2)?

百般思念 提交于 2019-12-01 20:11:20
问题 Although the socket.io document said 'sticky session' can make socket.io work with node cluster. I just can't make it work. I find pm2 had several issues opened against it, the closest solution I can find is this, "force to use websock option only", don't use sticky session at all. Has anyone had any experience that makes node cluster work with socket.io? ------- update -------- I checked the other two sticky session implementations mentioned here, sticky-session vs socket.io-sticky-session

How to make sticky session works with socket.io (w/ or w/o pm2)?

僤鯓⒐⒋嵵緔 提交于 2019-12-01 18:05:26
Although the socket.io document said ' sticky session ' can make socket.io work with node cluster. I just can't make it work. I find pm2 had several issues opened against it, the closest solution I can find is this , "force to use websock option only", don't use sticky session at all. Has anyone had any experience that makes node cluster work with socket.io? ------- update -------- I checked the other two sticky session implementations mentioned here, sticky-session vs socket.io-sticky-session node js library ! Which is better? , find 'sticky-cluster' can do the job. Another lesson I learned

Apache load balance tomcat websocket

有些话、适合烂在心里 提交于 2019-12-01 00:17:46
I am currently developing a websocket application, which is deployed on a Tomcat server. Because of the huge number of users I would like to distribute the workload to multiple Tomcat instances. I decided to use Apache for load balancing. Now I have a problem with the implementation of Apache load balancing and sticky session for websockets requests. This is my Apache configuration: ProxyRequests off SSLProxyEngine on RewriteEngine On <Proxy balancer://http-localhost/> BalancerMember https://mcsgest1.desy.de:8443/Whiteboard/ route=jvm1 keepalive=On smax=1 connectiontimeout=10 retry=600 timeout