3 ms·
For a local client, yes, scaling would not be a concern; there is one websocket per client. But this same method could be used for remote clients as well; I ha
by pdonis 8y ago
For a local client, yes, scaling would not be a concern; there is one websocket per client.
But this same method could be used for remote clients as well; I have a websocket-based "dashboard" for a project I'm working on that will potentially have to scale to thousands or more of remote clients. For a case like that, scaling is indeed a concern.
For example, the very simple websocket server used in the article won't scale well beyond a certain point because it spawns a new thread per client; something like gevent (which is what my dashboard uses) will scale much better. (Also the server in the example just exits on any exception; you need more robust error handling for something that needs to handle remote clients.)