rails proc spawning question

#1
Hello! I'm curious about the spawning of new rails processes that litespeed does...

will litespeed spawn new procs rather than stack behind an existing/busy one if it hasn't reached max-procs? and if it has reached max-procs is it smart about which procs it sends new requests to (will it send to ones not busy before it sends to ones that are busy, or is it just round-robin?)
 

mistwang

LiteSpeed Staff
#2
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.
 
Top