Optimizing the Puppet CA using Apache

40 views
Skip to first unread message

Erik Dalén

unread,
Jan 14, 2014, 10:31:40 AM1/14/14
to puppet...@googlegroups.com
I did a bit of a hack to serve the static files in the Puppet CA directly using Apache instead of going through the Ruby layer and indirector.
It speeds things up quite a lot and also allows use of HTTP caching headers like IfModifiedSince etc.

So here's some instructions on how to do it: https://gist.github.com/dalen/8419913

Works for me, but no guarantees etc :)

--
Erik Dalén

Matthias Saou

unread,
Jan 15, 2014, 3:48:35 AM1/15/14
to puppet...@googlegroups.com
This is a simple and interesting change. Care to share some numbers
about the "speeds things up quite a bit" part? :-)

Matthias

--
Matthias Saou ██ ██
██ ██
Web: http://matthias.saou.eu/ ██████████████
Mail/XMPP: matt...@saou.eu ████ ██████ ████
██████████████████████
GPG: 4096R/E755CC63 ██ ██████████████ ██
8D91 7E2E F048 9C9C 46AF ██ ██ ██ ██
21A9 7A51 7B82 E755 CC63 ████ ████

Erik Dalén

unread,
Jan 16, 2014, 4:13:30 AM1/16/14
to puppet...@googlegroups.com
In the simple testing I did I found that they were an order of magnitude faster. But in general these are requests Puppet only does on the first run for that host, so it won't be a big speedup of Puppet in general. More like cutting 0.5 seconds from the first run or so :)

But in our case we wanted to update the CRL when it had changed on the server, so this allowed us to have a curl with the -z option run before puppet that downloads it only if it is changed. Puppet itself doesn't support caching headers, but Apache does of course when serving static files.

I can see if I can make a proper benchmark though.


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140115094835.28088937%40r2d2.marmotte.net.
For more options, visit https://groups.google.com/groups/opt_out.



--
Erik Dalén
Reply all
Reply to author
Forward
0 new messages