| mistwang |
01-05-2007 11:04 AM |
LSWS will spawn one process for each rails application, this process will have the rails framework initialized then watch for new connection from web server, then fork children processes to do the real work, the cost of adding new process is the lowest, the connection between web server and a ruby process will be kept alive whenever possible.
LSWS tracks which connection is idle and push requests to the process associated with the first idle connection. If all connections are busy and maximum allowed is reached, LSWS will queue the request until next available connection. LSWS always try to use least number of procs. Not round-robin.
|