View Single Post
  #2 (permalink)  
Old 02-27-2003
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Re: Server Scalability & Asynchronous IO

Quote:
Originally posted by Ken Carpenter
It is my understanding that using select() with a large FD_SET is not very scalable. As a result, all the network servers I've written have used asynchronous IO and completion ports (on Windows obviously).
That's right, and that's why we have a special optimization for WIN32. Have a look at ThreadPool.cpp. Search for the following comment:

//
// Optimization for WIN32 specific version of fd_set. Looping with a
// FD_ISSET test like for Unix is very unefficient for WIN32.
//

Quote:
Originally posted by Ken Carpenter
What mechanism does ICE use to allow scalability to thousands of simultaneous network connections? I can't imagine it uses a thread-per-connection model, and using grep I can't find any evidence of completion ports.
We use a thread pool model, using the leader-follower pattern. This means that the number of threads being used doesn't increase with the number of connections. Again, if you are interested in the details, have a look at ThreadPool.cpp.

Furthermore, Ice uses "Active Connection Management" (ACM): Connections which have been idle for a certain time are automatically closed (gracefully, so that no messages get lost). When the connection is needed again, it is reestablished. (ACM is optional and can be switched on or off using configuration parameters.)
Reply With Quote