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: WinXP and 2K: Inbound Connections Limited to 10?
    ... sockets without any problem ... > Microsoft might probably take the position that a program (like my server) ... > program that handles more than than 10 connections concurrently. ... > know of any recent version of Windows that enforces this limit in the ...
    (microsoft.public.win32.programmer.networks)
  • Re: WinXP and 2K: Inbound Connections Limited to 10?
    ... the Web) have convinced me that my server will work just fine and that WinXP ... program that handles more than than 10 connections concurrently. ... many simultaneous sockets can I have open with Winsock?" ... "...I have seen reports of a 64 MB Windows NT 4.0 machine hitting the wall ...
    (microsoft.public.win32.programmer.networks)