Can someone make a comparison between this and the Elixir Phoenix 2m websocket conmections example. I want to sleep.
I remember seeing a talk on the 2m websocket Elixir example and one of the keys to it was that the sockets were actually being used and processing messages intermittently during the test. Important thing to keep in mind vs simply opening. The other thing I'd be interested to see Elixir demonstrate would be doing a hot deployment to avoid triggering all 2m connections to try reconnect at the same time. The other impor…
Handling 1M websocket connections in Go
51–60 of 68 posts
Re: Handling 1M websocket connections in Go
#521 million tcp connections with vertx / kotlin https://github.com/lfmunoz/vertx-kt-rocket Nothing special other than having to tune Linux
Jvm is very optimized, so it's actually something not that non-special.
That is not totally true, This is a mix of 2 things, using the JVM (which like you said is being tuned and optimized for heavy loads) + using a true asynchronous and reactive programming (and IO) model built on great technologies such as (in this specific case: Kotlin, Eclipse Vert.x and Netty).
As an experiment if you would pick another random set of libraries (imagine a servlet container) achieving the same results would not be so trivial, see for example:
https://www.techempower.com/benchmarks/#section=data-r17&hw=...
And observe that Eclipse Vert.x is on the top for these reasons while other JVM frameworks are far behind.
Re: Handling 1M websocket connections in Go
#53I'd like to see this kind of story combined with the "how to build a business" threads to discuss what kinds of business models and sizes require a million websocket connections to one process. 1M simultaneous users of a React (or other) app, is that a decently simple case? What are some sites that have this level of activity? I found a 5yr old article that says Spotify had 20MM simultaneous users then, but spread ov…
Re: Handling 1M websocket connections in Go
#54Re: Handling 1M websocket connections in Go
#55"1M socket connections" is easy. Having them all do something useful at the same time is the hard part. (And no, "async" won't save you here.)
Re: Handling 1M websocket connections in Go
#56Earlier quoted context omitted.
When people rewrite system from X where X in (Python, Ruby, Node, Clojure) to Go they usually see at least 10x improvement. This is just one recent example: https://www.infoq.com/articles/api-gateway-clojure-golang The money quote: "The end result enabled us to reduce 25 instances (c4 xlarge) running Clojure code - able to process 60 concurrent requests, to two instances (c3.2xlarge) running Go code able to support ~…
"When people rewrite system from X where X in (Python, Ruby, Node, Clojure) to Go they usually see at least 10x improvement." Sure but how much of the performance gains come from Go and how much come from just having a better understanding of the problem the second time around?
Pypy leads to a near 10x speed up over cPython as well.
Re: Handling 1M websocket connections in Go
#57I'd like to see this kind of story combined with the "how to build a business" threads to discuss what kinds of business models and sizes require a million websocket connections to one process. 1M simultaneous users of a React (or other) app, is that a decently simple case? What are some sites that have this level of activity? I found a 5yr old article that says Spotify had 20MM simultaneous users then, but spread ov…
I have written a 1mm+ simultaneous user websocket server for a second screen app for a well known talent TV show in Node. It was running on a single server (with failovers and redundancies of course) just fine, but 99% of the server was just broadcasting. The hard part is sending single messages to users with user-specific content.
Re: Handling 1M websocket connections in Go
#58Earlier quoted context omitted.
Or Java or C# or basically any non-interpreted language.
In this case, Clojure is already running on the JVM
Idiomatic clojure is routinely slower than idiomatic Java and that’s a well known and expected outcome.
Re: Handling 1M websocket connections in Go
#59I'd like to see this kind of story combined with the "how to build a business" threads to discuss what kinds of business models and sizes require a million websocket connections to one process. 1M simultaneous users of a React (or other) app, is that a decently simple case? What are some sites that have this level of activity? I found a 5yr old article that says Spotify had 20MM simultaneous users then, but spread ov…
I like to think of projects like this when a team of "engineers" have trouble scaling their cloud service to support more then one simultaneous user.
Re: Handling 1M websocket connections in Go
#60These kinds of benchmarks are not very meaningful. I think that pretty much any modern framework/language can handle at least 1 million idle WebSockets. It's much more interesting to measure performance when you start sending messages through them at regular intervals.
When people rewrite system from X where X in (Python, Ruby, Node, Clojure) to Go they usually see at least 10x improvement. This is just one recent example: https://www.infoq.com/articles/api-gateway-clojure-golang The money quote: "The end result enabled us to reduce 25 instances (c4 xlarge) running Clojure code - able to process 60 concurrent requests, to two instances (c3.2xlarge) running Go code able to support ~…