Starting in Varnish 6.0, we have a new and exciting solution that is a game changer when it comes to content acceleration. The solution is Varnish E-Commerce Accelerator and it allows Varnish to cache previously uncacheable Magento content.
As laid out in my previous post, Varnish E-Commerce Accelerator leverages XBody and Edgestash technology to deconstruct content into JSON data and a Mustache template and then reconstruct the page on delivery. This allows Varnish to re-use the JSON and template across requests and achieve a 90% or higher cache hit rate on content that is usually regarded as uncacheable.
Varnish E-Commerce Accelerator
Why Varnish E-Commerce Accelerator
The advantage of Varnish E-Commerce Accelerator over other kinds of content acceleration solutions, like Turpentine, is the fact that you do not need to make any backend changes to Magento. Varnish E-Commerce Accelerator works with any Magento installation as is and can deliver instant performance enhancing results.
Also, Varnish E-Commerce Accelerator is a true full page cache. 100% of the client response is served from cache!
How Does It Work With Magento
Magento pages are widely accepted as uncacheable. This is due to heavy use of user personalizations, with the most pronounced being CSRF protections on all product actions. CSRF protection is achieved by adding a session form_key token into each action, which is a kind of hidden personalization.
By leveraging Varnish E-Commerce Accelerator, personalizations can be extracted, including the session form_key, into JSON and this data is cached user by user in Varnish. At the same time, each page is converted into a re-usable Mustache template. Then the user JSON is combined with the template and Magento pages are 100% served from cache!
Our base Magento 1 VCL configuration is available here.
The results of using Varnish E-Commerce Accelerator with Magento are impressive. It's important to note that caching static Magento content was never a problem and is commonly done today. However, page rendering is driven by the base Magento page (which is uncacheable) and can account for up to 85% of the page speed performance you see in the browser.
Here is a Chrome network profile of a Magento product page loading before using Varnish:
Magento performance before Varnish
We can see that the Magento page took approx 5 seconds to download from the server. This pushed total content rendering time for the page close to 10 seconds!
Here is the same network profile after using Varnish E-Commerce Accelerator:
Magento performance after Varnish
The Magento page took approximately 200 ms to load and total content rendering time is about 2 seconds! This is an unbelievable performance achievement and has resulted in direct ROI for this customer in terms of higher sales and higher customer satisfaction.
Varnish E-Commerce Accelerator has opened the door for huge performance savings to all Magento users. If you are a Magento user and looking for a way to dramatically boost your performance, please contact us at email@example.com
Learn more about the technicalities here or join the webinar on caching the uncacheable with the Varnish E-Commerce Accelerator.