Reverse Proxy & Magento Caching

Anthony Grutter, Chief Technical Officer - Co-fondateur
Le 24 octobre 2016
  • ecommerce

Lecture :5 minutes

Magento, the open source ecommerce platform, is fast and stable in performance. However, each time a Magento page starts building and loading, in excess of a million instructions are being executed on the web server. This consumes an enormous amount of CPU and Memory resources. That is why, on a busy server, it can lead to the insufficient resources which cause slow page loads and lack of speed.

Magento Caching

The solution to this problem is caching. When pages or some blocks of pages are cached, instead of hitting every new user request directly to the server resources, they are served from the cache.

Cache saves the page builds so that when a request to that particular page is received, the cached version is being served which ultimately saves much time. Cache performs both actions; it increases the speed of page and also reduces the load on the server.

While Magento has an advanced built-in cache technology, it is better to move the caching responsibilities to a separate dedicated caching application. In this blog post, I would like to discuss one option for Magento external caching i.e. The Reverse Proxy Caching.

What is Reverse Proxy?

Reverse Proxy is a server that works between client and another server. It accepts user requests and hits back requests to another server. Basically, it is a proxy medium that communicates between the user and other parts of a network.

Reverse Proxy is a type of proxy which accepts requests on behalf of one or more servers, forwards those requests to another server, and then passes the data back to the client returned by that server. So, in our case, we have Magento servers as the servers and web browsers as the clients. A load balancer or a firewall can be the best example of Reverse Proxy.

Reverse Proxy Caching

Now we are heading to the interesting part. The Reverse Proxy Caching located between a web browser and a Magento installation, is capable of caching Magento pages or some of the blocks in it, and return them to the browser without any further interference of the Magento application. These types of Reverse Proxy Caching are also known as web accelerators, for obvious reasons.

It is necessary to mention that not everything on a page can be cached. Most of the core ecommerce operations are dynamic, for example the shopping cart or checkout process. The Reverse Proxy Caching cannot cache or speed up those operations because they are specific to each and every session. Hence, caching them may disturb your various processes. However, it can improve performance on category/product pages or any other static resources.

The Reverse Proxy Caching can also reduce the load of generating static pages so that more resources are free for the parts of other ecommerce process and operations that need to be produced at the request-time.

The best example of the Reverse Proxy Caching used with Magento is Varnish. On its own, Varnish does not work well with Magento 1, but it has built-in support in Magento 2. However, for Magento 1, we mainly use a Magento module named as Turpentine that provides support for Magento 1 + Varnish integration.


The results are more efficient and faster using the Reverse Proxy Caching with Magento stores. It reduces the usage of resources and delivers a more responsive shopping and administration experience on a heavy loaded Magento ecommerce store.

If you have anything to say related to this article, feel free to share your thoughts in the comments section.

Author Bio

Fayyaz Khattak is the Magento Community Manager at Cloudways - A Managed Magento Hosting Platform. His objective is to learn & share about PHP & Magento Development in Community. He loves food and driving.
You can email him at or you can follow him on Twitter.

Abonnez-vous au blog pour ne rien louper