PHP has PHP-FPM, a pool of PHP processes that run, are managed, go away and respawn, etc.
This pool can be used for a bunch of different applications across a system. You set up nginx with a virtual host and tell it to forward *.php requests on a particular port (or unix socket), and the worker handles the rest.
It is really, really useful when you’re on a resource-constrained box running a lot of little apps that aren’t used frequently.
I have not seen anything like this for Ruby, in that Rails takes a while to start and is a self-contained app that runs, rather than PHP was has one or more arbitrary entry points in the form of files that you can throw at it.
Am I correct in my assumption that you can’t do the FPM-style app free-for-all with Ruby?
(I am aware of Heroku and already use it for side-projects, but I’m more interested in learning more how things work under the covers.)
After some more looking:
From what I can tell, the closest equivalent is Phusion Passenger (set up with Nginx), which spools up workers for apps as they’re requested (or in advance if needed), and then killed off after a configurable idle period.
Close Enough ™. 🙂