WebSocket with scalability
Marc Hämmerle
mail at no7hing.com
Tue Aug 9 11:07:58 EDT 2011
AFAIK the machine that opens the socket connections actually is limited by the number of available ephemeral ports - and those are generally <= 64k
Am 09.08.2011 um 16:56 schrieb John D. Mitchell:
> Hi folks,
>
> On Aug 9, 2011, at 03:17 , ljohnston wrote:
>> Benoit Perroud wrote:
> [...]
>>> In the scenario of scaling websocket, using any software proxy won't
>>> scale to more than 64'000 connections, which is the number of port
>>> (ipv4) the proxy can open to forward incoming connection to processing
>>> nodes.
>
> Alas, that's just plain false. There can be *way* more connections per IP and per port!
>
> See below for more info...
>
>> Slight correction (hope you don't mind), the limitation on the number of
>> ports is a feature of TCP (and UDP) which defines unsigned 16 bit fields for
>> the source and destination port numbers.
>>
>> IP (either V4 or V6) only knows about IP addresses.
>>
>> Just in case anyone was thinking IPv6 might change things - it won't
>> although it may eventually result in even more clients wanting to connect to
>> your limited number of ports simultaneously :)
>
> The sockets are identified and managed as 4-tuples (src-IP, src-port, dest-IP, dest-port). See, e.g.:
> http://en.wikipedia.org/wiki/Internet_socket
>
> As always, it's a good recommendation for people to read the classics TCP/IP Illustrated books by W. Richard Stevens:
> http://www.kohala.com/start/
>
> Anyways, for an example of scaling to boatloads of connections in the wild (with a fun write up and lots of engineering/tuning details):
> http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1
>
> Take care,
> John
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
More information about the netty-users
mailing list