Subject | Re: [IB-Architect] Classic vs. superserver (long, very very long) |
---|---|
Author | John Bellardo |
Post date | 2002-10-16T18:45:55Z |
Jim,
On Wednesday, October 16, 2002, at 08:49 AM, Jim Starkey wrote:
> At 02:42 PM 10/15/02 -0700, John Bellardo wrote:
>>
>> As best I can determine all our major platforms support the ability to
>> send sockets between processes, so this "load balancer" has a constant
>> (close to single context switch) overhead.
>>
>
> Interesting. I hadn't run into that trick. It certainly
> changes the analysis. Could you send some pointers on how
> this is done in Linux and Win32?
I don't know Win32, but check "man 7 unix" on a linux system. There is
a note in the man page that this API is not necessarily portable, but
I've seen similar offerings on other systems.
>
> Apache apparently forks with the listening socket bound,
> then serializes the "accept" calls. The inline comments
> state that non-serialized accepts are unsafe on all platforms.
> What are the tradeoffs between this technique and sending
> a connected socket?
Policy enforcement. If you wanted to route different connections to
different servers based on some information (database path, client ip,
etc) that needs to be read from the socket or read from the socket data
structures. That is a much easier task to centralize.
> [...]
More followup later...
-John