Re: Lost data on socket - Can we start over politely?

From: Villy Kruse (vek_at_station02.ohout.pharmapartners.nl)
Date: 04/05/04


Date: 05 Apr 2004 14:07:29 GMT

On 2 Apr 2004 21:58:21 -0500,
    Vorxion <vorxion@knockingshopofthemind.com> wrote:

>
> Actually, going back to web servers, assuming you use a forked model,
> they're still all sitting on the same port--how does it decide which socket
> it will attempt to connect to? Or is there something in the lower layer
> functionality that forces it to either aggregate the pool or forces a roll
> to the first open spot in the pool?
>

Apache uses a some kind of locking so one and only one of the servers
are listining on a socket. As soon as a socket is connected the lock
is released and another of the servers will be granted the lock and will
listen for the next connection. Doing it this way avoids the thundering
herd problem you would otherwise get when all the servers see a connection
come in and all try to accept it. For a connected socket both the source
IP and port and the destination IP and port identifies the socket and
thus the server process which handles this connection.

Villy



Relevant Pages

  • Re: Port 7070
    ... why that port is open. ... It always returns a reset when a connection is ... tcpdump on the client machine shows a complete ... Running the client on a machine on the servers LAN shows that the port ...
    (freebsd-questions)
  • Re: Router Multitech VPN
    ... >I can I make my Outlook (Exchange connection) work when connected to the ... there should not be any port to open. ... An easier way to deal with this is to use WINS servers. ... work without having to manually map it in the LMHOSTS file. ...
    (comp.security.firewalls)
  • Re: Downloading 1.10
    ... That's fine if you've got a direct connection between your PC and the ... needs its own Torrent port forwarded. ... I didn't even bother testing that port for the other two servers. ... your downstream pipe when they fill the upstream pipe. ...
    (alt.games.warcraft)
  • Re: GNAT.Sockets. Blocking?
    ... some servers to prevent robot or programs ... request some browsers information or they close the connection. ... end loop ... I'm kind of new to socket programming and I need some help here. ...
    (comp.lang.ada)
  • DNS Errors ?
    ... We have a VB.NET 2.0 application running as a service on several servers. ... domain admin acct. ... or established connection failed because connected host has failed to ... Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState ...
    (microsoft.public.dotnet.general)