Developing a server receiving multiple sockets

From: Jo (JoJoTwilligo_at_hotmail.com)
Date: 09/02/04


Date: 1 Sep 2004 20:07:17 -0700

I've never written a server before, so I don't know much about some of
the basics. The one I'm writing can expect the same volume of sockets
as a web server: any number at anytime. So how do web servers buffer
for a theoretically infinite number of connections requests? Does it
just keep taking connections until it crashes, or does it have some
hard limit?

   Also, how are these multiple sockets managed? Are they piled in
some large link list and read from whenever they receive packets? Or
does a parent do the listening, followed by a fork() when a connection
comes in, wherein the child goes and does all the work while the
parent goes back to listening? Putting it that way, I guess the link
list idea is a pretty poor one, but I really don't know how these
things work, and I'm surprised at the amount of documentation I
haven't been able to find on this.



Relevant Pages

  • sockets, closing and TIME_WAIT
    ... During heavy load the server can't follow anymore because the sockets ... my server should be able to handle 10 clients connecting ... This gets a free position in the array of connections, ...
    (comp.unix.programmer)
  • Re: network programming: how does s.accept() work?
    ... The program you contact at Google is a server. ... so, the server will usually assign a new port, say 56399, specifically ... connections to a server remain on the same port, ... sockets is what identifies them. ...
    (comp.lang.python)
  • socket_select() hangs sometimes; Bug?
    ... socket_selectfor accepting new connections and dealing with existing ... The select runs on all connected sockets for read and ... the server hangs after some time. ...
    (php.general)
  • Re: select.select()
    ... Imagine a process which has a lot of network connections open. ... one server process(*) and a bunch of clients which have all made TCP ... connections over individual sockets. ...
    (comp.lang.python)
  • Re: select.select()
    ... Imagine a process which has a lot of network connections open. ... one server process(*) and a bunch of clients which have all made TCP ... connections over individual sockets. ...
    (comp.lang.python)