SiteGround has recently announced a significant upgrade to its SuperCacher technology, changing a core component from Varnish over to NGINX (pronounced “Engine X”). The purpose of the change was mainly to provide SSL support, but it also has a secondary benefit of improving performance and stability.
Quick overview of the SiteGround SuperCacher
The SuperCacher is a web caching service offered by SiteGround that offers three different levels of caching:
- Static Caching - This is included in all SiteGround plans and caches static files such as images, stylesheets, etc.
- Memcached - Memcached is a popular caching system that speeds up database driven websites by caching data and objects into RAM.(similar to object caching functionality in W3 Total cache). Memcached is available for all plans except the StartUp Plan.
- Dynamic Cache - This is probably the most compelling aspect of the SuperCacher, which caches the results of the web pages into memory.
SiteGround explained that the Static Caching and Dynamic Cache before now were built on top of Varnish, because at the time (before the widespread use of SSL and e-commerce websites) it was a very robust solution:
We built our SuperCacher on top of Varnish because at the time that was the most flexible and robust solution that could accommodate the diverse needs of the websites we host. It allowed us to provide caching for various different apps and website configurations. Also, since we use Apache as a web server, that was the most clean and stable implementation possible.
At the time, SiteGround were one of the very few companies that offered such dynamic caching (with the ability for users to exclude URLs from being cached without contacting the hosting company) which has helped them stand out as one of the best premium hosting providers around.
If Varnish is so Good, Why Replace with NGINX?
No matter how great their SuperCacher was, it had a major flaw. The Static and Dynamic Caching parts of the SuperCacher were not compatible with SSL and HTTPS requests. The developers managing the Varnish code stating that they have no intention to support SSL due to the complexity:
There are a number of reasons why there are no plans that will grow SSL support in Varnish.
First, I have yet to see a SSL library where the source code is not a nightmare. [ …]
Second, it is not exactly the best source-code in the world. Even if I have no idea what it does, there are many aspect of it that scares me.
This does not give much confidence for the future of Varnish and as SSL becomes more mainstream Varnish will become increasingly shunned as a solution.
Also, with the recent boost in Google Search for those websites using SSL, and the ever-increasing numbers of e-commerce websites that need SSL it seems non-encrypted websites might soon be a thing of the past.
With all of this in mind and with NGINX supporting SSL out of the box, it is a very sensible move for SiteGround to change from Varnish to NGINX.
SiteGround has also implemented SPDY (pronounced “Speedy”. This is a networking protocol that augments HTTP with several speed-related features such as:
- Compression of request and response headers. This cuts down bandwidth usage when similar headers are sent multiple times for different requests.
- Allows multiplexed requests over a single connection saving on round trips between client and server, thus preventing low priority requests blocking high priority ones.
- Allows the server to send resources actively to the browser that it knows will be needed, rather than waiting for them to be requested.
Just How Fast is the new SuperCacher?
To test this, we need a speed test with the same website both before and after the new NGINX implementation. Fortunately, we took some speed tests on the 6th April 2015 while updating our W3 Total Cache Tutorial (using a somewhat slow WordPress Theme), and we have some excellent benchmarks.
All these tests were carried out on SiteGround GoGeek plan at their EU Server in Amsterdam:
No W3 Total Cache settings + No SuperCacher
W3 Total Cache settings as per our tutorial + No SuperCacher
W3 Total Cache (Page cache only) + Varnish SuperCacher
NGINX SuperCacher only - No W3 Total Cache
It took us a little longer to release the results below as we had to check the correct configuration to use. We have now configured the test website with the new NGINX SuperCacher, and there are a few differences on the implementation over the previous version. For one, the NGINX SuperCacher does “full page” caching into RAM and includes all the necessary Browser Cache settings. You, therefore, do NOT need W3 Total Cache “at all” for your website to be fully optimized.
See the result below:
As you can see, the new SuperCacher is a bit quicker, has the benefit of working with SSL and is much easy to configure (there are no need to mess around with Browser Cache or Page Caching). You would be crazy not to test this out on your website.
The Migration to the new SuperCacher
If you know anything about SiteGround, then you will be aware that it is almost their mission to not only be fast but also to be reliable. Just take how OCD they took their Server Migration to a new data center as just an example. To minimize disruption, SiteGround undertook the updating of the SuperCacher in several steps.
Firstly, they launched a new version of their SuperCacher so that as many of their customers had updated as possible. Once they had detected that most of their customers had upgraded the plugin, they started switching to the servers over to NGINX. Only when they were 100 percent sure everything was working well did they enable the SSL caching.
If you are interested in trying out SiteGround, we currently have an exclusive offer giving you up to 60 percent off their hosting. Note that you will need at least the GrowBig plan to get the full benefit of their SuperCacher.