Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

ngx_pagespeed vs mod_pagespeed

Jeff Kaufman edited this page Jan 10, 2017 · 1 revision

For the most part ngx_pagespeed and mod_pagespeed run the same optimization flow, but there are some differences in how they hook into PSOL and what works where:

  • Nginx is event loop based and so uses ProxyFetch to start asynchronous optimization. Apache is blocking and so can call into PSOL directly.
  • In Apache if two Directory blocks match an incoming request the options from both are merged and apply, while in nginx only one will apply and priority is complicated.
  • Apache has an ABI so we can ship binary packages. Nginx only recently added support for loadable modules at all, and a binary module only works with the specific point release version of Nginx it was compiled for. We do ship a pre-compiled binary of PSOL for ngx_pagespeed to use, but the integration between nginx and PSOl (the contents of the ngx_pagespeed repo) still needs to be built from source.
Clone this wiki locally