I've just switched over to serve all of www.ogre.com out of Apache Traffic Server. The site is still managed and created using Apache HTTPD, PHP and Drupal, but that is running as an "origin" server to ATS. This gives me a few benefits over serving straight out of Apache HTTPD:
- Static content is automatically "cached" on the ATS server, and it can serve such content very fast with low latency.
- I can jack up keep-alive much higher than I dared doing with HTTPD. Fwiw, I still use the pre-fork MPM, so I have limited number of processes and can't afford to tie those up with idle KA connections.
- In a pinch, I could turn the HTML generated from Drupal to be cacheable, and serve straight out of ATS. I'm contemplating making this setting automatic, so when the load on the box hits a certain level, all HTML will also be cached by ATS. That would increase my capacity by at least a magnitude I think.
This change required no changes on my Drupal site, but I did change the port on my Apache HTTPD virtual host:
NameVirtualHost 18.104.22.168:8080 <VirtualHost 22.214.171.124:8080> ServerName www.ogre.com ...
I then installed Apache Traffic Server to listen on port 80, and I also told it to only bind a specific IP on my server (I have three IPs for different things). I also increased the RAM cache size and Keep-Alive timeouts, so I now have these changes in etc/trafficserver/records.config:
CONFIG proxy.config.proxy_name STRING kramer3.ogre.com CONFIG proxy.config.http.server_port INT 80 CONFIG proxy.config.http.keep_alive_no_activity_timeout_in INT 60 CONFIG proxy.config.http.keep_alive_no_activity_timeout_out INT 1 CONFIG proxy.config.http.transaction_no_activity_timeout_in INT 15 CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 30 CONFIG proxy.config.cache.ram_cache.size LLONG 33554432 LOCAL proxy.local.incoming_ip_to_bind STRING 126.96.36.199
Next, I added a disk cache to use for ATS, etc/trafficserver/storage.config:
This creates a 128MB cache in /disk/tmp. I know, very small, but this is still experimental. Finally, I added a remapping rule to etc/trafficserver/remap.config:
map http://www.ogre.com/ http://www.ogre.com:8080/
After starting everything up, the entire site is now reverse proxied (or accelerated) through Apache Traffic Server! As you can see, the changes necessary to ATS are fairly small, and pretty straight forward, most of the default settings 'just work'. It's a miracle.