April 27, 2019

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

Improve WordPress performance and learn how reverse proxy and object caching (Redis/Memcached) take performance to the next 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 spike in traffic. If your website's content goes viral, for example, or is published by an influential figure like a politician, and you suddenly receive attention on social media or other channels, the concentrated influx of traffic can bring your website to its knees. A 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's the fastest WordPress caching plugin on the planet? Probably Batcache , a blazing-fast plugin used to speed up the world's largest WordPress server, WordPress.com.

Now look at this chart from Joe Hoyle comparing Batcache to a different option, like 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, response times start to rise to 10, 25, 40, and even 70 seconds . This only happens at the highest traffic levels, but that's where we want to be, right? We certainly can't expect to have a good result with just a few online users. The real rewards and earnings are where there are many online users, like with our clients, where we have millions of unique visitors per month in some cases, up to over 50 million unique visitors per month.

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

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

What's the orange graph that stays steady even when the number of concurrent users starts to grow significantly? This is a reverse proxy, also known as a Reverse Proxy.

A reverse proxy (in this case, Varnish) is an intermediary service that runs independently, not as part of WordPress, and accepts requests from the WordPress server. Like a caching plugin, it provides a pre-saved copy of a WordPress response for a limited time called the 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 and WP Fastest Cache.

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

File System Issues – One of the drawbacks of file-based caches like WP Super Cache is that on certain file systems (especially network file systems like NFS), disk can significantly impact performance when writing, deleting, or modifying many files at once. This can cause your site to not cache data (making it slow) or serve poorly cached data (making it appear broken). Varnish keeps cached page data in RAM, which prevents this problem.

Plugin 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 performed upstream and only individual elements are cached. This means you remain fully compatible with plugins and dynamic content.

Required Web Server Configuration : Many plugins, such as WP Rocket, require specific settings on the web server for caching to work. In many cases, the webmaster is unable to change the web server settings or has a non-Apache web server such as NGINX or GWAN.

Inefficient compression management : Some WordPress caching plugins compress most of your files using GZIP each time they're 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. CDNs take the same approach. This means that Varnish's compression management is optimized for most users.

No error isolation – Varnish and CDN can recognize when something is wrong with your server and help you overcome it by providing slightly more stable (but still functional) content. This can significantly reduce the impact of downtime. Most WP page caching plugins don't 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 at 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 or 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're now convinced that a reverse proxy like Varnish and object caching like Memcached/Redis are essential for preparing for large-scale traffic. However, setting these up can be a bit complex. That's where we come in!

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 integrated and preconfigured 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.

DISCLAIMER, Legal Notes and Copyright. RedHat, Inc. holds the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of the AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. holds 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 holds the rights to Oracle®, MySQL®, MyRocks®, VirtualBox®, and ZFS®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; PostgreSQL® is a registered trademark of PostgreSQL Global Development Group; SQLite® is a registered trademark of Hipp, Wyrick & Company, Inc.; KeyDB® is a registered trademark of EQ Alpha Technology Ltd.; Typesense® is a registered trademark of Typesense Inc.; 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; HAProxy® is a registered trademark of HAProxy Technologies LLC; Traefik® is a registered trademark of Traefik Labs; Envoy® is a registered trademark of CNCF; Adobe Inc. owns the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited; Automattic Inc. holds the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert owns the rights to Drupal®; Shopify® is a registered trademark of Shopify Inc.; BigCommerce® is a registered trademark of BigCommerce Pty. Ltd.; TYPO3® is a registered trademark of the TYPO3 Association; Ghost® is a registered trademark of the Ghost Foundation; Amazon Web Services, Inc. owns the rights to AWS® and Amazon SES®; Google LLC owns the rights to Google Cloud™, Chrome™, and Google Kubernetes Engine™; Alibaba Cloud® is a registered trademark of Alibaba Group Holding Limited; DigitalOcean® is a registered trademark of DigitalOcean, LLC; Linode® is a registered trademark of Linode, LLC; Vultr® is a registered trademark of The Constant Company, LLC; Akamai® is a registered trademark of Akamai Technologies, Inc.; Fastly® is a registered trademark of Fastly, Inc.; Let's Encrypt® is a registered trademark of the Internet Security Research Group; Microsoft Corporation owns the rights to Microsoft®, Azure®, Windows®, Office®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®; Apache® is a registered trademark of The Apache Software Foundation; Apache Tomcat® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group; Docker® is a registered trademark of Docker, Inc.; Kubernetes® is a registered trademark of The Linux Foundation; OpenShift® is a registered trademark of Red Hat, Inc.; Podman® is a registered trademark of Red Hat, Inc.; Proxmox® is a registered trademark of Proxmox Server Solutions GmbH; VMware® is a registered trademark of Broadcom Inc.; 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; Grafana® is a registered trademark of Grafana Labs; Prometheus® is a registered trademark of The Linux Foundation; Zabbix® is a registered trademark of Zabbix LLC; Datadog® is a registered trademark of Datadog, Inc.; Ceph® is a registered trademark of Red Hat, Inc.; MinIO® is a registered trademark of MinIO, Inc.; Mailgun® is a registered trademark of Mailgun Technologies, Inc.; SendGrid® is a registered trademark of Twilio Inc.; Postmark® is a registered trademark of ActiveCampaign, LLC; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Hetzner® is a registered trademark of Hetzner Online GmbH; OVHcloud® is a registered trademark of OVH Groupe SAS; Terraform® is a registered trademark of HashiCorp, Inc.; Ansible® is a registered trademark of Red Hat, Inc.; cURL® is a registered trademark of Daniel Stenberg; Facebook®, Inc. owns the rights to Facebook®, Messenger® and Instagram®. This site is not affiliated with, sponsored by, or otherwise associated with any of the above-mentioned entities 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. All other trademarks mentioned are the property of their respective registrants. MANAGED SERVER® is a European registered trademark of MANAGED SERVER SRL, with registered office in Via Flavio Gioia, 6, 62012 Civitanova Marche (MC), Italy and operational headquarters in Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Have you ever wondered if your hosting sucks?

Find out now if your hosting provider is hurting you with a slow website worthy of 1990! Instant results.

Close the CTA
Back to top