I'm currently handling over 2,000 active users connected to my server via secure WebSocket connections for a real-time dashboard. I'm looking to implement a Load Balancer to help manage these connections, especially to facilitate seamless server upgrades without downtime. However, I've heard that some Load Balancers might only effectively manage around 1,500 new connections per minute, which raises concerns about performance. What are the best and most cost-effective ways to set up a Load Balancer and SSL that can reliably support these 2,000+ continuous connections?
5 Answers
Have you looked into AWS AppSync or API Gateway? They both support WebSockets and can be a solid alternative for your use case. API Gateway may cost a bit more, but the functionality it offers could be well worth it depending on your needs.
You might also want to consider running multiple Load Balancers and using Route53 for traffic distribution if a single Load Balancer runs into limitations. This setup can help manage peak loads more effectively!
It really depends on the kind of Load Balancer you're considering. Application Load Balancers (ALBs) and Network Load Balancers (NLBs) have different features. For WebSocket connections, SSL termination can happen on the ALB, while with the NLB, you have options. But remember, since you're using persistent connections, breaking them during upgrades can be tricky. You might want to manage this with a DNS solution, like Route53, which can help you direct traffic without the added costs of a Load Balancer. 2000 users connecting at different times throughout the day usually isn’t a big deal, so don’t stress too much about hitting that 1500 connection limit too soon. Plus, AWS LBs are designed to scale, so they’ll usually manage whatever load you throw at them with some preparation!
For sure! And it's good to keep an eye on your users' connection patterns so you can manage expectations accordingly.
Another approach could be to deploy multiple instances of Caddy itself. This way, you can directly manage connections without relying solely on a Load Balancer, keeping your system efficient and flexible.
What did you base your concerns about the 1,500 connections per minute on? Load balancers generally scale pretty well, especially AWS ones. They can handle significant increases in traffic with scaling settings. Typically, an ALB can double its capacity within minutes, and NLBs have robust scaling generally starting at 3 Gbps and ramping up quickly if you prepare them for traffic spikes in advance. Just make sure your architecture is designed to handle that scaling.

Absolutely! API Gateway has features that can make managing real-time connections more seamless.