If you have seen other articles on the site you know we are on a quest to make Joomla run as fast as possible.
The next step was to set up a a server side cache that could help the site go faster.
We are filling in the document as we learn more about the best way to configure Varnish
What is Varnish
Varnish is a reverse proxy caching system that has the ability to cache your entire site.
How Varnish Works
To serve a website using varnish you will need two servers are running:
- Regular Apache listening for connections on port 8000 and serving Joomla.
- Varnish, acting as a cache layer between users and Apache.
When a visitor requests a resource, it checks if it's in the cache. If not, it connects to port 8000 and asks Apache for the resource. If the resource is cacheable, it's stored and served from cache the next time.
Whether the resource can be cached is determined using HTTP headers, mainly Expires is taken into account. By default, Joomla sends headers prohibiting browsers and proxies to cache, so its behavior needs to be modified by a plugin.
Varnish vs. Standard Joomla Cache
Install Varnish
1. you will need root access or an account with sufficient privildges
2. make and compile varnish
3. Set up your varnish config or VCL file
This is a pretty high level overview because the article is more focused on how joomla and Varnish work together. For more specific instructions go to ????
Configure Joomla to work with Varnish
1. Install the plugin header expires. This will allows you set the headers so that varnish can determine if the page should be served from the cache or not.
Results you can expect to see
Page speed increases