[MUD-Dev] How to support 1000+ simultaneous connections, and some philosophy.

Matthew D. Fuller fullermd at futuresouth.com
Tue Mar 9 23:56:20 CET 1999


On Tue, Mar 09, 1999 at 10:03:22PM -0700, a little birdie told me
that Ben Greear remarked
> It looks like you'd want one program sitting on your well known
> port, accepting connections.  It could be attached to the 'real'
> server via a single socket or pipe.  A trivial packet encapsulation
> with a unique ID as far as the main server is concerned should
> work just fine.
> 
> That works for a while, but then how do you re-use this detached
> server when it's load goes down again?
> 
> Anyone know how Apache does it?

I believe (but don't kill me if I'm wrong) that Apache does this by
having the master httpd accept() all the connections, and then pass them
onto one of the child processes to do the page serving, though a pipe or
shared mem or some other IPC.  That seems to be The Way To Do Things
among a lot of higher-volume servers like that.

Personally, I find it easier on the small scale (and 1000 is small scale,
large scale is 40,000 or so) to just pump up the number of descriptors
per-process in the OS kernel.  This, of course, carries its own set of
complications, and I suspect it'll really start choking beyond maybe 10
thousand, but if my own personal ultimate MUD ever gets a) finished (not
likely, it'll never be finished) and b) that popular, I'll be more
surprised than the next person.  I'm relying on brute force, sure, but
enough of it will always work  ;>


> Btw, as an observer of human behavior, I don't understand, but
> think it is significant, that as soon as the dev-mud project came
> online, there was a rash of implementation detail posts, and then
> almost silence on both groups.  Books have been written about
> the outcome of clashes between a fantasy realm, and a 'real' realm.
> I think that is what we saw played out before our eyes.  The high
> fantasy of imaginary realms, features, and lofty goals collided
> mightily with databases, language choice, and the ugly details of
> reality.  After a huge amount of sparks, both lie almost in a coma.
> 
> Am I being too melodramatic?  Did I just get dropped from the lists? :)

It's some sort of psychological exponential backoff in action I think  :)

You get the flurry of debate and suggestions, and eventually those most
concerned, able, and interested go off and start implementing (and thus
tend to shut up and code), and the rest realize they've said all they
have to say, people have made their decisions, and get bored with it.


> Anyway, good cheer to all,
> Ben




---

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
| Matthew Fuller     http://www.over-yonder.net/~fullermd |
* fullermd at futuresouth.com       fullermd at over-yonder.net *
| UNIX Systems Administrator      Specializing in FreeBSD |
*   FutureSouth Communications   ISPHelp ISP Consulting   *
|  "The only reason I'm burning my candle at both ends,   |
*    is because I haven't figured out how to light the    *
|                     middle yet"                         |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


_______________________________________________
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