Setting up Passenger and the Puppet master vhost for a dedicated Puppet master instance
Note: None of the settings or config below will make your master process requests faster. Each request will still take the same amount of time. However these setting can allow your server to handle more concurrent requests, always be ready to handle incoming requests, and generally page you less in the middle of the night.
Which Passenger should I install?
Passenger 3 or better. Passenger 2 is over 4 years old and does not support a number of features discussed below. I currently recommend Passenger 5.x as the safest assuming you're running Puppet 3.8.x or greater.
How should I install Passenger?
If you use Debian/Ubuntu I highly recommend the very current packages PhusionPassenger provides.
If you use RHEL/Centos, the EPEL repo provides Passenger 3.0.21. Given a choice between gem installing Passenger 5, building the module, etc etc I'd stick with the older package. Using the package should also avoid problems with selinux as well.
PhusionPassenger is now publishing Passenger 5.x RPMs for Redhat 6 and 7. I recommend moving to these packages if you're running Puppet 3.8.x. If you masters are still Redhat 5.x basesd, use EPEL.
Any other distro will need to use local packages if they exist or gem install.
Which module from the Forge should I use to install Passenger?
tl;dr, None of them are very good and make bad assumptions in the config.
There are three recent modules that install and config Passenger. I'm not a fan of any of them because they include unneeded and broken settings in passenger.conf, don't attempt to tune Passenger at all, or do unneeded build from src installs. If you already use one of the modules below, you might consider forking and updating the config templates.
Tuning Passenger itself
Passenger provides several parameters for tuning. The full set of docs are quite good and located here. In this example I'm going to assume that the server had four cores and 4GB of RAM. Each master process is going to require 200-250MB of RAM. Each catalog request is going to hit the CPU pretty hard making CPU the number one limiting factor of your Puppet master.
The following values should be safe to set globally. If you run other applications on your server you may want to move the non global setting to your Puppet master vhost.
# MaxPoolSize is a global setting. It can only be set once. I usually recommend
# 2 * cores on physical machines and 1.5 on VMs. This is the max number of
# application processes Passenger will spawn on the server. If you have multiple
# applications such as Puppet and Puppet Dashboard this is max of both instances
# combined. If you find that your server is consistently ...