Improve Magento eCommerce Speed ​​Using Varnish Cache - 🏆 Managed Server
April 23 2022

Improve Magento eCommerce speed by using Varnish Cache

The importance of an enterprise-grade Full Page Cache and the advantages of your Magento and Magento 2

Magento 2 Hosting Varnish Cache Banner

In recent times we have been literally bombarded with Magento Hosting and Magento 2 Hosting requests. We are talking about an average of about 6 requests per day which given the complexity and costs of Magento development, and given the reduced diffusion compared to the much more adopted WooCommerce and Prestashop however, it does a very high average.

In all the analyzes we have done for two months now we have noticed a common denominator, all those who contact us complaining about the slowness of their ecommerce, do not use Varnish.

Maybe many have adopted the Free version of CloudFlare, have adopted very expensive hardware resources on Amazon AWS with requests for over 1000 euros per month, but nevertheless they contact us because they complain about slowness, and from the analyzes we carried out we then discovered that the lack of Varnish is precisely the cause.

We have already talked about Varnish in a very exhaustive way in many posts on our blog, being in our opinion a tool that can really make a difference if used wisely.

What is Varnish?

You may be wondering what Varnish is. Well, if you're looking for blazingly fast caching technology (or reverse caching proxy), you're on the right track.

It works on the principle that a user reaches the Varnish server just before the request is redirected to the web server (if a cached version is not available). It will only take a few milliseconds for the page to be delivered from the Varnish cache in case a cached version of the request is available. Response time depends on hardware, but since loading a prepared response from memory is much faster than having the web server process everything on disk by running PHP and MySQL, using Varnish is much faster than just Magento cache mechanisms.

Varnish MagentoIn other words, Varnish is an HTTP booster. There are several ways to use this technology: as a failover system, reverse caching proxy, or load balancing. All of these ways will result in surprisingly increased Magento site performance.

The configuration language of this technology is known as Varnish Cache Language (VCL). It will be converted and compiled into C code. All the contents of the cache will be immediately provided by the service memory. You might think about applying Magento Varnish if your websites are having trouble getting traffic or are essentially cluttered.

Main advantages of Varnish and Magento

Caching is a frequently applied practice that helps to store data ready for recovery without the need to rerun all the processes to model this data. To make all this data available at any time, it is important to store it in RAM memory or on a disk with fast reading speeds. It excludes the need to download them again and thus saves a lot of time and nerves.

For example, your browser cache will cache resources such as images and JavaScript when you use appropriate caching tools. Varnish takes your site caching to a new level. Whenever a visitor comes to your website, a series of requests are sent to the server to load the page. The server starts looking for files that match the requests. It requires running any server-side code related to the request and then sending the fully rendered web page to the client.


Having Varnish means having a tool that will check for duplicate requests already received previously. After the first visit to a page, Varnish will create an exact copy of what is returned to the user. In other words, the next time a user accesses the same page, this proxy will recognize the previous request so that it responds faster with a cached version of the result.

With the help of this simple method, any online entrepreneur can increase the speed of his website 300-1000 times! Varnish is not a specific technology to use with Magento, but due to the large amount of Magento performance issues, it has now become a best practice and strong advice from the Magento and Adobe community,

Furthermore, whenever the site is hit with large amounts of traffic, it is sufficiently equipped to cope with it. It works so that the time it takes to return a cached result requires less processing power than completing requests from the beginning, while limiting CPU spikes.

Improved conversion and sales.

Together with Magento optimized with Varnish, you can notice a significant improvement in your conversion. Conversion potential is directly dependent on page loading speed. Going up, this feature contributes to the overall profitability of your website. There is a number of successful examples. For instance,in the case of Walmart, reduced page load time by 1 second and this resulted in up to 2% increase in conversions. As for Amazon, each 0,1 second increase in load time reduces sales by 1%. While these companies may operate on a different playing field, you should be able to spot the difference that page loading speed makes.

SEO improvement

According to the most important search engine in the world, page load time can have a positive or negative effect on your shop's ranking. Since one of Google's primary purposes is to only display those sites that offer the best user experience at the top, you risk failing if your website runs slowly. Even if you offer the best products at fair prices, if your competitor's online store loads faster, it will likely negatively affect your ranking for your desired keywords.

About a year ago, since Google declared that the site performance would become a ranking factor, the priorities of developers and digital marketing agencies have changed.

With the term "Page Experience" Google summarizes numerous factors that make the usability of a site measurable: together with the use of HTTPs, optimization for mobile devices and the abandonment of Interstitials, Core Web Vitals have a particularly prominent place.

Thanks to them Google can in fact measure the performance of a site through 3 different metrics: the loading time (Largest Contentful Paint, LCP), The reaction rate (First Input Delay, IN) and the visual stability page (Cumulative Layout Shift, CLS).

Improved user experience

Pretend you are moving around the website and watching the upload icon rotate for a while. Most likely, you will return to the search engine to choose another similar site that loads faster. Keep in mind that a shorter page load period could potentially reduce the bounce rate from your page.

One-time installation

Many Magento applications or extensions require regular updates due to the rapid progress of e-commerce. But it's different for Varnish.

Once installed, this caching technology will, in theory, last for the life of your website.

You don't need to do any additional work to configure this proxy thanks to some specialized Magento extensions. Modify the Varnish configuration to fit Magento. Magento behaviors are also modified to stimulate caching rates.

To sum it up, fast page loading offers any online business four benefits:

  1. The increase in conversion rates.
  2. Reduced rate of abandoned carts on your website
  3. Reduced waiting time for viewers to view your content.
  4. Improved SEO value.

Together with Magento native Full Page Caching, Varnish becomes the best solution for full site optimization and page loading speed. After installing this caching technology, Varnish will immediately lighten the load on your web server. All the benefits it boasts will be noticed if your site generates high traffic. Magento and Magento 2 sites make the most of Varnish as they use a large number of web server resources when generating the pages. By choosing Varnish and configuring it correctly, you will see significant speed improvements very soon.

Reduced costs in the short, medium and long term

One of the concerns we see most often is that of costs.

"Eh but the costs?", "It costs a lot"?

These are the classic questions and the most recurring concerns once we finish a call with a potential client. A little as if Varnish were a very expensive software or service and must necessarily cost prohibitive figures.

Let's immediately dispel this myth by making the following premises:

  1. Varnish is an Open Source software, free, you can download and install it for free.
  2. Varnish has strong documentation for Magento and MAgento 2 and vice versa, Magento and Magento 2 have strong documentation for Varnish
  3. The cost of putting into production / configuration / testing usually takes half a working day for painstaking work done with gloves.
  4. Therefore, the cost can be really cheap and indicatively it can have a value of € 250 which is normally preferred to "spread" in the cost of Hosting.
  5. The costs of European services are notoriously much cheaper than the same services provided in high-income countries (the United States above all)
  6. Having 16 CPUs with 64 GB of RAM on a dedicated server is much cheaper and more profitable than having the same ones on Cloud instances on Amazon AWS eg.

For example, a customer who buys Varnish Hosting on a high-end dedicated server (12 threads, 64GB of RAM, 2 × 512 SSD nVME in RAID1) will not pay the cost of the Varnish installation, but will simply find the service included in the Magento Hosting service rental from 150 € per month.

We already know that there will probably be competing companies that are making you spend 300, 500, 1000 euros a month for a trivial hosting, giving you less hardware power and no system optimization, let alone Varnish.

Maybe you add unnecessarily CDNs, AWS instances in which you pay every single byte out and you are doing it only because you have seen others do it or because your company that follows you at the IT level does not know how to use the right tools correctly.

You can easily eat the minister with a fork and say that it works, but don't complain if it takes longer and the experience is not the best.


Varnish Cache is beneficial both for users who need assistance to perform essential functions and for advanced users who have extensive experience in technology.

Since i Magento sites they use a lot of web server resources, makes the most of Varnish.

Once the Varnish cache was installed correctly and configured to work with Magento, we'll look at a few significant speed improvements.

Let's start your journey together to become a professional and high performing Magento site.
Contact now and we will find the best Magento hosting solution for you.

Do you have doubts? Not sure where to start? Contact us

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.


Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

INFORMATION is the leading Italian provider of high performance hosting solutions. Our subscription model is affordable and predictable, so customers can access our reliable hosting technologies, dedicated servers and the cloud. also offers excellent support and consulting services on Hosting of the main Open Source CMS such as WordPress, WooCommerce, Drupal, Prestashop, Magento.

Back to top