I thought you can make only 65k connections per port because of TCP limitations.
Handling 1M websocket connections in Go
11–20 of 68 posts
Re: Handling 1M websocket connections in Go
#12I thought you can make only 65k connections per port because of TCP limitations.
The limit is 65k connections per client IP address, limited by the number of available ports on the client. You can theoretically accept connections from all possible client IP addresses simultaneously. This means that in order to test 1M simultaneous connections, you would need to use at least 16 client IP addresses. Probably more.
Re: Handling 1M websocket connections in Go
#13Can 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…
Re: Handling 1M websocket connections in Go
#14I thought you can make only 65k connections per port because of TCP limitations.
Re: Handling 1M websocket connections in Go
#15Re: Handling 1M websocket connections in Go
#16These 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.
Re: Handling 1M websocket connections in Go
#17Re: Handling 1M websocket connections in Go
#18This also reminds me of Erlang VM handling 2M for Whatsapp on a single server in 2012:
Re: Handling 1M websocket connections in Go
#191M 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 over 12,000 machines, so suffice it to say I'm having trouble finding a use-case here besides (good!) research.
Re: Handling 1M websocket connections in Go
#20I thought you can make only 65k connections per port because of TCP limitations.
The limit is 65k connections per client IP address, limited by the number of available ports on the client. You can theoretically accept connections from all possible client IP addresses simultaneously. This means that in order to test 1M simultaneous connections, you would need to use at least 16 client IP addresses. Probably more.
127.0.0.2
127.0.0.3
etc.
I once had to test a piece of software that identified its connections by the source IP, so I had a script to create thousands of loopback addresses within 127.0.0.0/8 and then run against that software and verify the connections were doing what they were supposed to do. (This was on Mac OS X.)