I am running free cartridge on openshift, whats is the maximum concurrent websocket connection it can handle ?
if i run a nodejs+socket.io server how many clients can connect to it at same time ?
Dose scale with web traffic will affect numbers ?
I am running free cartridge on openshift, whats is the maximum concurrent websocket connection it can handle ?
if i run a nodejs+socket.io server how many clients can connect to it at same time ?
Dose scale with web traffic will affect numbers ?
I am recently trying to use WebSocket in OpenShift using socket.io.
First I thought maximum WebSocket connection would be limited by their concurrent connection limit. But they currently don't have such limit. Their support staff replied me (Sep 19, 2016):
We do not exercise limiting concurrent connections to gears presently, so the actual limit will be defined by the resources use (number of gears and their sizes) and your code's efficiency.
Note that there could be some limits implemented into cartridges however, e.g. the MySQL add-on cartridge will limit the concurrent connections to the database server per the my.cnf configuration.
So, you are limited by server resource. NodeJs can handle many concurrent connections with low server resource. So, quite a lot users can connect at the same time. You just need to tweak your code and OS configuration.
You need to run stress test/load test on your server to get an idea of the limit. I tested with 50 concurrent users, and it worked fine. There are tools which can help you to run such tests or you can design simple test yourself. I used loadimpact.
Of course scale with web traffic will affect numbers. Read This to understand how scaling works. (Here they mentioned, 16 max concurrent connections per gear, but I think this document is outdated as the support staff said currently they don't limit simultaneous connections.)