Re: Lost data on socket - Can we start over politely?
From: Villy Kruse (vek_at_station02.ohout.pharmapartners.nl)
Date: 04/05/04
- Next message: Jürgen Exner: "Re: Unknown function"
- Previous message: Randal L. Schwartz: "Re: custom perl interpreter?"
- In reply to: Vorxion: "Re: Lost data on socket - Can we start over politely?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Jürgen Exner: "Re: Unknown function"
- Previous message: Randal L. Schwartz: "Re: custom perl interpreter?"
- In reply to: Vorxion: "Re: Lost data on socket - Can we start over politely?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|