+1 (617) 7782998 |

PageSpeed for Apache Traffic Server

ats_pagespeed brings automatic web performance optimization to Apache Traffic Server based upon Google's official PageSpeed SDK.

The first use- of this plugin is our online demonstration service of PageSpeed optimization for Microsoft IIS: IISpeed.

Apache Traffic Server is a fast, scalable and extensible HTTP/1.1 compliant caching reverse proxy server.
Formerly a commercial product, Yahoo! donated it to the Apache Foundation, and it is now an Apache TLP.

Google PageSpeed Optimization speeds up your website with PageSpeed optimization products by implementing the web performance best practices.

To build, a simple 'make' should work. Use 'sudo make install' to install. Optionally, patching ATS with ethread.patch helps with eliminating latency that sometimes gets induced when synchronising ATS's and PSOL's thread pools.

After that, update ATS's plugin.config with:                                                                         /usr/local/etc/trafficserver/gzip.config also is build with ats_pagespeed, as it currently is a slightly modified version of the official one from the ATS repository.

There are some hard-coded things in the plugin, these directories should exist:

  • /tmp/ps_log/ to exist
  • /tmp/ats_ps/ to exist

Configuration files go into /usr/local/etc/trafficserver/psol. That folder is monitored, and changes to files in there are picked up immediately.

Example configuration

# Base configuration for the module, all host-specific configuration
# will inherit. 
pagespeed RewriteLevel CoreFilters
# Mandatory FileCachePath setting. The path must exist and be read/write for the traffic_server process.
pagespeed FileCachePath /tmp/ats_pagespeed/
# [host]
# Force traffic server to cache all origin responses
pagespeed FlushHtml on
pagespeed RewriteLevel CoreFilters
pagespeed EnableFilters rewrite_domains,trim_urls
pagespeed MapRewriteDomain
pagespeed MapOriginDomain
pagespeed EnableFilters prioritize_critical_css,move_css_to_head,move_css_above_scripts
pagespeed EnableFilters fallback_rewrite_css_urls,insert_img_dimensions,lazyload_images,local_storage_cache
pagespeed EnableFilters prioritize_critical_css,rewrite_css
pagespeed EnableFilters combine_javascript,combine_css

PageSpeed Configuration and Tuning

Recommended reading for setting up PageSpeed optimization in detail

You can view debug output of the plugin using traffic_server -T ".*speed.*"

The current state compiles against PSOL

ats_pagespeed has been moved to Apache The project lives on at, and the code can be found here.

We offer commercial PageSpeed support for the plugin..

Share View Comments
Some content on this website represents a modified version of the official Google PageSpeed documentation