r/Puppet • u/cvquesty • 1d ago
Before your next patch night: turn on splay so rebooted agents don't stampede your server
If you've ever watched your server's request queue pile up right after a mass reboot, this one's for you.
By default every agent runs on runinterval (30 minutes). When a few hundred nodes boot together after patching, or you clone a batch of VMs from one template, they all start the agent service together and they all ask for a catalog together. The JRuby pool fills, requests queue, and runs start timing out.
The fix: splay
splay = true: the agent sleeps a random time, up tosplaylimit, before its first run after the service starts. After that it runs on the normal interval, so that one random offset keeps the fleet spread out.splaylimit: defaults toruninterval, which is usually what you want.
Check what you have now:
puppet config print runinterval splay splaylimit --section agentThe setting lives in the [agent] section of puppet.conf:
[agent]
splay = trueManage it with your existing code (the same way you manage the rest of puppet.conf) rather than editing it by hand, or you've just made a new kind of drift.
What I'd avoid: "fixing" load by bumping runinterval to a few hours. The graphs get quieter, but drift correction gets a lot slower. Stagger first, look at compile times in your server metrics second, and add compilers only when the numbers say so.
Applies the same on OpenVox and Puppet. Anyone running non-default splaylimit values? Curious what's worked for you.