Hacker News new | past | comments | ask | show | jobs | submit login

How scalable is this? I would think it's easy to put together something that serves, say, 100 users simultaneously. But how well does this scale to 100K users?



It depends on how it's implemented. I used node.js to implement the websocket-based real-time aspects of my startup, Worlize, a graphical avatar-based chat platform where everyone can create their own chat world.

I use a sharded approach where each room is assigned to a random node.js websocket server when the first person enters it, and it's unloaded when the last person leaves. Just spin up more websocket servers to scale.

We have a hybrid platform with the website running on Ruby on Rails (REE 1.8.7, Unicorn, fronted by Nginx), and the real-time interaction handled by Node.js. I can tell you that the RoR servers fall over LONG before the Node.js servers even begin to break a sweat.

edit: Link to Worlize if you're curious: https://www.worlize.com/ Our Node.JS WebSocket Library: https://github.com/Worlize/WebSocket-Node


Nice!

How does it compare with Socket.io? I use Socket.io for Review19 - http://review19.com - and am always looking to experiment with new frameworks.. :-)


The two aren't necessarily the same kind of thing. WebSocket-Node is a low-level WebSocket framework. It supports both text and raw binary WebSocket messages. Socket.IO is not a WebSocket library, but sits one level higher on the stack. It's an abstraction layer that supports many different transports and overlays its own messaging semantics. For example, WebSocket-Node could theoretically provide the WebSocket transport for Socket.IO.

If you want WebSocket specifically, and don't care about falling back to long-polling techniques, or you want something that allows you to use true binary messages, look at a WebSocket library rather than an abstracted communications library like Socket.IO.


Review19 looks pretty cool! Looking forward to trying it out!


>But how well does this scale to 100K users?

It wouldn't. Designing a system to handle 100k simultaneous users is hard, and a problem few people suffer from.

Why would you ask this question?


Why would you ask this question?

Because maybe he is looking to develop a chat system that can scale to 100,000 users? There are many instances where someone is tasked to look at a technology and understand how it scales.

Frankly, it would be helpful for you to tell us how "It wouldn't"


Because the order of magnitude is insane.

It's a) not a common problem, and b) is obviously non trivial with current technology.

The bandwidth necessary for 100k users would saturate many a pipe, and would immediately require more than one commoditized machine.

It's like saying "That's a cute little Prius you got there. How many semi trailers can it pull?"


In my experience, a single node web socket server has trouble with 5,000 concurrent connections nonetheless 100,000 connections.


No reason why it can't scale. Spawn up more processes, load balance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: