Announcing PageSpeed mod_pagespeed support

  • Home
  • Blog
  • Announcing PageSpeed mod_pagespeed support
Announcing PageSpeed mod_pagespeed support Results

What is mod_pagespeed?

PageSpeed mod_pagespeed is a Module you can install under your Apache or nginx web-server. It can minify html, css & javascript and shrink images while being on a time budget.

Time Budget means that in case your request takes more than 10 milliseconds to process, it will pause and continue in the background. If the work is completed by the next request, it will serve the minified content instead. Amazing heh? Yea that was not originally our idea 🙂

It really has a neat and elegant architecture that resolves a lot of issues in our performance world. In fact, imghaste learned a lot from mod_pagespeed in the past.

Why is it so hard to support mod_pagespeed?

mod_pagespeed handles the requests using checksums, hash identifiers and URL Relativity in order identify the location of the real asset as well as what additional actions need to take place. (e.g. convert to webp, image resize etc.).

Those hash keys are constantly changing once every 10 minutes. They differ as per device, user, viewport, screen etc. in order to always keep content fresh content behind the scenes.

So its nearly impossible for a Content Delivery Network such as imghaste to get a sustainable cache hit ratio and benefit for the speed deliveries.

Is it that difficult though? Or it’s just that nobody has done it before?

Optimal Setups

At the beginning we tried a imghaste using a recipe from our cookbook. We thought it would work like a charm as it does with every other setup we ever tried. But that was not the case 🙂

We soon found out that we had failed to optimize it further.

Developers of mod_pagespeed designed the software to run on a single web server rather than working with a CDN such as imghaste.

And I dare to say that it does pretty good job amongst similar tools.

Yet, we still needed to leverage our Content Delivery Network & our Image expertise in order to make mod_pagespeed tool less CPU intensive and in a way, provide a whole new experience using the best of the both worlds.

The Case Study

We managed to create an amazing case study for toys-shop.gr which led to CPU load & Bandwidth reduction on their web server, while reaching cache hit ratios as high as 90% (lower than our average but still…. quite impressive).

CTO of toys-shop quoted:

There is always room for optimizations. We don’t realize it when we finish up our work. But technology is like a living being. You always have to stay tuned with cutting edge technologies and make sure you get the most out of them. I didn’t expect anything less from imghaste.