Reputation: 55
does anyone know about that the maximum concurrent connection of the websocket written by C#.
Upvotes: 3
Views: 1932
Reputation: 1064044
It is hard to give a maximum as it depends hugely on your workload and usage profile.
We currently have 60k open web-sockets per service instance, for a total of around 530k open connections (over 9 machines, but that isn't the main thing those machines do - they also run our main websites etc). To get 60k, we needed to use multiple listener ports per service (3 listener ports each servicing 20k web-sockets, all Inthe same service/process), as we were seeing OS limitations otherwise. We then bring together those 9x3 endpoints using haproxy, and expose them as a single visible endpoint. Haproxy also deals with the TLS aspect for us, so the web-socket server doesn't have to.
So: you can certainly get some fairly high numbers if you need. Note that this is using our custom web-socket server (pure c# / managed code) - "NetGain" (available on github).
Upvotes: 3