[MUD-Dev] How to support 1000+ simultaneous connections, and some philosophy.
Petri Virkkula
pvirkkul at iki.fi
Thu Mar 11 21:29:32 CET 1999
>>>>> "Chris" == Chris Gray <cg at ami-cg.GraySage.Edmonton.AB.CA> writes:
Chris> The problem with that is that then the clients have to connect to one
Chris> of those 10 ports. You might manage that if you have a special client
As others have pointed out there would not be multiple ports,
but multiple addresses with a single port number. The
addresses would then be given out eg. in round-robin
order. This is how many www-sites balances load between
multiple machines (my suggestion would distribute the load
between multiple processes, not machines).
If my first idea cannot be used (eg. because of limited amount
of ip-addresses), here is another idea:
Make the connection server accept eg. 1000 connections (and
serve them all). After that the server can fork(). The new
child would then close the main socket that is being listened
and only serve its 1000 clients. As soon as all the 1000
clients have closed their connections just exit the child. At
the same time the parent process closes all the client sockets
and start again collect a new set of 1000 clients.
The above method might result in multiple processes, each of them
handling just few clients. But the system might work fairly
well, but that is difficult to say without testing.
Petri
_______________________________________________
MUD-Dev maillist - MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list