[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: >1024 connections in slapd / select->poll

On Wed, Nov 17, 2004 at 01:33:52AM -0800, Howard Chu wrote:
> Descriptor-passing per se isn't necessary as long as you have descriptor 
> inheritance and shared memory. In that case you only need to provide one 
> master process performing select()s on the listener sockets, and a pool 
> of child processes inheriting those listeners. The child processes 
> rotate through performing accept()s so that the live session sockets are 
> only present in the children. You can spawn as many of these child 
> processes as necessary to keep the total number of active descriptors in 
> each process down to a manageable limit, using shared memory to 
> coordinate the rest of the program.

Okay, I did not know that you can issue multiple accept()s on a single
listening socket. How does the system guarantee at least close to even load
distribution? Random?


Attachment: pgpFIiOXbUUof.pgp
Description: PGP signature