Live data from Hacker News

600k concurrent websocket connections on AWS using Node.js (2015)

blog.jayway.com

41–50 of 141 posts

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#42
post #36
post #15

A few pieces of advice based on running https://github.com/mozilla-services/autopush-rs , which handles tens of millions of concurrent connections across a fleet of small EC2 instances. 1) Consider not running the largest instance you need to handle your workload, but instead distributing it across smaller instances. This allows for progressive rollout to test new versions, reduces the thundering herd when you restar…

If you have a lot of trafic you shoudn't use an ELB in the first place, should be using an NLB by default it comes with a 40Gb pipe and multi millions connections. https://docs.aws.amazon.com/elasticloadbalancing/latest/netw...

You can also employ DNS round robin with health checks in Route53

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#43
post #17
post #15

A few pieces of advice based on running https://github.com/mozilla-services/autopush-rs , which handles tens of millions of concurrent connections across a fleet of small EC2 instances. 1) Consider not running the largest instance you need to handle your workload, but instead distributing it across smaller instances. This allows for progressive rollout to test new versions, reduces the thundering herd when you restar…

Could you explain or post a link to something about #2? I’ve never heard of that before!

I can not. AWS, for whatever reason, does not want this publicly documented. I would write up what we learned in our testing in more detail, but I have been asked not to.

You can find some discussion of this behavior in places like https://forums.aws.amazon.com/thread.jspa?threadID=231806. I originally became aware of the issue, before hitting in production, from the HN comment at https://news.ycombinator.com/item?id=18314138

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#44
post #27

Earlier quoted context omitted.

Do you think they got big because they use it or do they use it because they're big? Pre-optimization is the root of all evil, my dude.

@runj__ You should read this blog post by Brex founder. He really says how Elixir suited well to the problem they were trying to solve https://medium.com/brexeng/why-brex-chose-elixir-fe1a4f31319...

In the end they picked it because they already knew it.

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#45
post #37

Earlier quoted context omitted.

There are a handful of languages that would be suitable for this. The "right one" to use depends on more than just the language features for that task: - What third party libraries do you need to use? Some languages have very good support for some, and less for others. - What are the internal integrations you need to support? Can they be over the network or are you calling into code in a particular language? - What i…

This is a very typical diplomatic answer to stick with old, known programming languages.

Maybe because a lot of the time it's good advice?

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#46
post #42
post #36

Earlier quoted context omitted.

If you have a lot of trafic you shoudn't use an ELB in the first place, should be using an NLB by default it comes with a 40Gb pipe and multi millions connections. https://docs.aws.amazon.com/elasticloadbalancing/latest/netw...

You can also employ DNS round robin with health checks in Route53

That's the first tool I grab for balancing _a lot_ of connections.

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#49
post #4

So 1/4 of what Elixir/Erlang can handle, but more difficult and less reliable: https://phoenixframework.org/blog/the-road-to-2-million-webs...

Not fair !

You are comparing "4 CPUs and 15GB of memory" for NodeJS with "40 CPUs and 128 GB of memory" for Elixir/Phoenix

Re: 600k concurrent websocket connections on AWS using Node.js (2015)

#50
post #42
post #36

Earlier quoted context omitted.

If you have a lot of trafic you shoudn't use an ELB in the first place, should be using an NLB by default it comes with a 40Gb pipe and multi millions connections. https://docs.aws.amazon.com/elasticloadbalancing/latest/netw...

You can also employ DNS round robin with health checks in Route53

ELB is pretty old and should be avoided tbh, use ALB and if you can't should switch to NLB ( for pure tcp LB ).
Post reply on HN