4 ms·
I'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 webs
by rhizome 8y ago
I'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 over 12,000 machines, so suffice it to say I'm having trouble finding a use-case here besides (good!) research.
- art0rz 8y agoI 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.
- toredash 8y agoAgree on the hard part. Fan out models like this with the same content is "easy". Getting unique content to specific users in an efficient way, in scale of 100.000 users plus, that's hard.
- zepolen 8y agoDo you have an example of this type of unique content?
- toredash 8y agoQuiz for instance with a leaderboard or prizing. Let say you publish an Quiz to 1 mill users. Everyone response and you store the responses centrally. Now you send out an aggregated view of the results (e.g. % answered A). Now, you want to inform one or more users that they won a prize. How do you do this effectively ? Of better, you want to display the ranking to each user if there are multiple quiz.
- kjksf 8y agoOne of their slides (https://speakerdeck.com/eranyanay/going-infinite-handling-1m-websockets-connections-in-go?slide=7 https://speakerdeck.com/eranyanay/going-infinite-handling-1m...) lists the use cases for such functionality and they are pretty broad (message queues, chat apps, notifications, social feeds, collaborative editing, location updates). When you consider the price of the hardware and complexity of the system, it's obviously useful not just for handling 1M connections per host but also 10k connections per host. If some other technology / framework can only do 1k connection per host, then you can per 10x less for hardware and have room to spare. And the system will simpler which means faster to develop.
- rhizome 8y agoSure, I can imagine all kinds of websocket applications and their economic tradeoffs, just not ones that have ever enjoyed a million connections against a single server instance.
- tomohawk 8y agoFlip it around. If the stack you're using is memory or compute intensive for a given load, it will cost you more to provision that load. You may not need to service 1M connections, but you may need to service 10K connections with a single box instead of multiple boxes due to cost.
- leonhandreke 8y agoApparently WhatsApp at some point handled 2M connections per server: http://highscalability.com/blog/2014/3/31/how-whatsapp-grew-to-nearly-500-million-users-11000-cores-an.html http://highscalability.com/blog/2014/3/31/how-whatsapp-grew-...
- sudhirj 8y agoI’m working on https://whatsgoingon.in https://whatsgoingon.in that needs this and uses the base technique - which is actually pretty cool and good enough. I can live with 20GB of RAM for a million connections, given that it’s a paid product (live blogging)
- z3t4 8y agoI 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.
- deleted 8y ago[deleted]