-
Notifications
You must be signed in to change notification settings - Fork 26
Load balancing #2
Comments
Hi, @Xaxatix! |
Well, the idea of the cluster module is to make better use of the system's resources, but that happens only on a single system. If you were to expand it to multiple, you have to add another layer of load balancing. But the problem comes from the fact that intra cluster sticky sessions don't play nice with reverse proxies/load balances, because the remoteAddress remains the same, so all traffic will always get routed to only one of the workers. |
Yep, I understood. Again, if your app works fine with load balancing than you simply don't need neither this module nor the Although, if you still think you do, then it means you want to implement sticky (not load-based) routing on your proxy and sticky sessions on every machine inside (horizontal and vertical scaling at once). In that case, your master process has to start reading a socket to get |
Yes, but not using clustering on a multi core machine would mean that you'd have to run your app multiple times and on different ports, which is kinda cumbersome if you ask me. But if you run in cluster mode, sticky sessions is required. So in reality to achieve true horizontal (multiple servers) and vertical (cluster per server) scaling, you'd need a sticky reverse proxy for the horizontal scalability part, and then another sticky reverse proxy in the master cluster process for the vertical scaling. Don't know if it's worth the trouble and most importantly performance loss to go this far just for |
Seeing this is pretty similar to the sticky-session module, I'd like to ask the same question like I did there (#41), is load balancing possible (through the XFF header or other means)?
The text was updated successfully, but these errors were encountered: