April 27 2019

When WordPress Cache plugins aren't enough. Reverse Proxy and Object Caching: performance at the highest level.

WordPress cache plugins can help your site go faster by improving page load times and your ability to serve much more traffic without performance degradation. But there will come a time when a cache plugin won't be enough.

All it takes is a huge traffic spike. If the content on your site goes viral for example, or is posted by an influential person like a politician and you get sudden attention on social media or other channels, the concentrated stream of traffic can bring your site to its knees. Huge success can turn into a performance disaster.

This page will answer the following questions:

  • Why are WP cache plugins not large enough?
  • How do professionals handle WordPress caching?
  • What additional tools do they have besides regular cache plugins?
  • What benefits can you get from these additional tools?
  • How can you get super performance caching built into WordPress?

Note : we are the creators of ManagedServer.it, the high-performance enterprise-level hosting platform for WordPress. The information below is based on our experience hosting thousands of demanding WordPress sites and helping them scale.

Why caching plugins aren't enough - Check out the reverse proxy

What is the fastest WordPress cache plugin on the planet? Probably Batcache, a lightning-fast plugin used to speed up the largest WordPress server in the world, WordPress.com.

Now look this graphic by Joe Hoyle comparing Batcache with a different option, such as Varnish.

The green graph shows what happens to this industrial-grade plug-in as well as you increase the number of concurrent users on your site:

As the load increases to 20, 50, 100 and more concurrent users, i response times start to rise to 10, 25, 40 and even 70 seconds . It only happens at the highest levels of traffic, but that's where we want to be, right? We certainly cannot hope to have a good result with some online users. The real remuneration and real earnings are precisely where there are many users online as in our customers where in some cases we have millions of unique visitors per month, up to over 50 million unique visitors per month.

Our WordPress client with a high traffic site with over 50 million visitors per month.

This above concept applies to many popular WordPress cache plugins, such as WP Rocket e W3 Total Cache , which serve web pages using WordPress and its underlying PHP engine. They rely on compression, CSS minification of JS and other techniques to reduce page load time, and this works on a small scale, but suffers when WordPress itself starts choking on big traffic.

What is the orange graph that remains stable even when the number of concurrent users starts to grow significantly? This is a reverse proxy or also known as a Reverse Proxy.

A reverse proxy (in this case Varnish) is an intermediate service that runs independently, not as part of WordPress, and accepts requests to the WordPress server. As a cache plugin, it provides a pre-saved copy of a WordPress response for a limited time called TTL (Time To Live).

The difference is that while caching plugins are driven by the WordPress server, which can tire as the load increases, a tool like Varnish specializes in serving cache requests and can be literally up to 500 times more efficient than a PHP web server, without operating the Webserver in any way, and PHP. A reverse proxy will respond first and foremost and being written in C language oriented to the network and performance the performance will be absolutely fast.

Varnish Reverse Proxy WordPress operation

This in fact generates an incredible flat graph as traffic increases to mega-site levels.

Static file based plug-ins compared to Varnish

Some WordPress cache plugins work differently - they save static files of your dynamic WordPress pages and redirect web visitors to those static versions.

This is an approach that bypasses WordPress and the PHP engine and, in theory, can be as fast as Varnish with high traffic volumes. Some examples are WP Super Cache e WP Fastest Cache .

However, there are a number of problems we've seen with static file-based caching plugins:

File system problems - One of the disadvantages of file-based caches like WP Super Cache is that on certain file systems (especially a network file system like NFS) the disk can significantly damage performance when writing / deleting / modifying many files at the same time. This can result in your site not caching data (making it slow) or serving poorly cached data (making it look broken). Varnish keeps the page data cached in RAM, which avoids this problem.

Plug-in incompatibility - Due to the number of different ways data can be rendered / assembled using WordPress, not all plugins can take advantage of different caching solutions and run into compatibility issues. With Varnish, caching is done upstream and only individual items are cached. This means that you will remain fully compatible with plugins and dynamic content.

Web server configuration required - Many plug-ins, such as WP Rocket, require specific settings on the web server for the cache to work. In many cases, the webmaster cannot change the web server settings or has a non-Apache web server such as NGINX or GWAN.

Inefficient compression management : Some WordPress cache plugins compress most of your files using GZIP whenever they are requested. Varnish caches compressed pages and delivers them as-is for web browsers that support GZIP (99%) and decompresses files on the fly, which is less efficient, only for browsers that don't support GZIP. The same approach is taken by CDNs. This means that Varnish's compression management is optimized for most users.

No isolation in case of error - Varnish and CDN are able to recognize when something is wrong on your server and help you get through this time by offering slightly more stable (but still functional) content. This can significantly reduce the impact of downtime. Most WP page caching plug-ins do not do this, minimizing web server downtime.

We strongly believe that Varnish is the best option for large-scale WordPress. That's why we have implemented it as part of our WordPress hosting platform.

Object Caching or Object Cache: speeds up dynamic page views

This chart from New Relic shows what can happen when you integrate a tool called Object Cache - a popular tool is Redis . This refers to another aspect of performance on a larger scale: an internal object cache.

An object cache is a way of storing data from the database in memory, to avoid unnecessary queries on the database. WordPress comes with its own internal object cache, but many experts say it's pretty inefficient.

As with reverse proxy, here too using a dedicated external service for object caching can make a dramatic difference, as can be seen in the graph above - more timely database operations that slow down a site can go down almost. to zero.

The most common options for caching external objects are Redis o Memcached (or in the cloud, AWS ElastiCache or Azure Managed Cache), which can significantly speed up execution and reduce DB load.

Managed Server: The Easiest Way to Get WordPress Hosting with Varnish and Integrated Object Caching

We hope you are now convinced that a Reverse Proxy like Varnish and object caching like Memcached / Redis is very important to prepare for large scale traffic. However, creating these things can be a bit complex. Here's where we come!

ManagedServer.it is an enterprise-level WordPress hosting service that offers advanced performance and advanced DevOps features, using an automated and preconfigured platform. Among other performance features, we provide pre-configured and integrated Varnish and Redis or memcached.

So, if you set the your WordPress site on our systems, you will enjoy all the benefits of reverse proxy and advanced object caching, without having to work hard to make everything work.

If you demand performance and speed, do not rely on any hosting provider. The biggest sites choose us.

Do you have doubts? Don't know 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.

0256569681

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

Contact us online

Open a request directly in the contact area.

INFORMATION

Managed Server Srl is a leading Italian player in providing advanced GNU/Linux system solutions oriented towards high performance. With a low-cost and predictable subscription model, we ensure that our customers have access to advanced technologies in hosting, dedicated servers and cloud services. In addition to this, we offer systems consultancy on Linux systems and specialized maintenance in DBMS, IT Security, Cloud and much more. We stand out for our expertise in hosting leading Open Source CMS such as WordPress, WooCommerce, Drupal, Prestashop, Joomla, OpenCart and Magento, supported by a high-level support and consultancy service suitable for Public Administration, SMEs and any size.

Red Hat, Inc. owns the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. owns the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt. Oracle Corporation owns the rights to Oracle®, MySQL®, and MyRocks®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; REDIS® is a registered trademark of Redis Labs Ltd. F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB. Adobe Inc. holds the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited. Automattic Inc. owns the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert holds the rights to Drupal®. Amazon Web Services, Inc. holds the rights to AWS®; Google LLC holds the rights to Google Cloud™ and Chrome™; Microsoft Corporation holds the rights to Microsoft®, Azure®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®. Apache® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group. CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV Hetzner Online GmbH owns the rights to Hetzner®; OVHcloud is a registered trademark of OVH Groupe SAS; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Facebook, Inc. owns the rights to Facebook®. This site is not affiliated, sponsored or otherwise associated with any of the entities mentioned above and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. Any other trademarks mentioned belong to their registrants. MANAGED SERVER® is a trademark registered at European level by MANAGED SERVER SRL, Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Would you like to see how your WooCommerce runs on our systems without having to migrate anything? 

Enter the address of your WooCommerce site and you will get a navigable demonstration, without having to do absolutely anything and completely free.

No thanks, my customers prefer the slow site.
Back to top