Did you know that a one-second delay in page load time can reduce conversions by 7%?

There is one simple solution to drastically improve the performance of your website…

…caching!

In this article, we will discuss what is caching, and compare two powerful caching solutions – Redis Full-Page Cache and NGINX FastCGI Caching. 

Let’s get started!

A Primer on WordPress Caching

Before we dive deep into the comparison, let’s quickly recap what caching is and how it works.

In layman’s terms, caching is the process of storing frequently accessed information in a quickly accessible location, such as RAM or a disk.

Storing this information allows the server to retrieve the data faster when someone requests it. This greatly reduces the page load times as the server needs to do fewer computations to generate all of the content from scratch.

If you are interested to learn more about this topic beyond the scope of this article, then you should read our other articles on What is Object Caching and How To Use Redis Full-Page Caching To Speed Up WordPress.

What Is Redis Full-Page Caching?

Redis is an open-source database that can store key-value pairs in memory – this design makes Redis a great choice for caching data.

Redis Full-Page Caching is a technique for caching WordPress data in such a way that it stores the entire HTML output of a web page in Redis cache memory. This means that when a user requests the web page, the cached HTML is retrieved from Redis memory instead of generating it from scratch, resulting in a faster response time.

Redis full page caching can be enabled easily in the RunCloud dashboard. Just go to your web application dashboard and look for the RunCloud Hub setting. Install the RunCloud Hub plugin to automatically configure the settings.

Once you have installed the plugin, you can change the lifespan of the cached content, or purge it directly from the dashboard.To learn more about this, read our article on How Redis Object Caching can improve your website’s performance.

What Is NGINX FastCGI Caching?

NGINX is a popular web server that is known for its high-performance and stability. NGINX FastCGI caching is a way to store the entire HTML documents to disk for easier access. When a user requests the web page, the cached HTML is retrieved from disk storage, resulting in a faster response time.

NGINX FastCGI caching works by proxying requests from clients to an application server that uses a FastCGI protocol, such as PHP-FPM. It then serves all subsequent requests directly, without contacting the backend again for a specified amount of time.

You can quickly start using this caching method – just go to your RunCloud dashboard and open the web application that you want to optimize. In the dashboard, look for the RunCloud Hub plugin and enable it.

Once you have enabled caching, you can configure additional settings such as the lifespan of cached content, or see how much content has been cached already.To get a deeper understanding of the topic, we recommend you to read our tutorial on Nginx caching and How To Use Nginx FastCGI Cache.

The Benchmarks – What The Data Shows

Having a consistent test environment was our utmost priority to ensure we generated reproducible results.

We deployed three identical WordPress websites running on PHP 8.2 on Ubuntu 22 LTS server to compare the performance differences between Redis Full-Page caching and NGINX FastCGI caching. 

On each website, we created a new webpage with 20 paragraphs of text and 2 images. All of the websites had SSL enabled and used identical themes without any additional plugins.

Finally, all of the websites were tested with a sustained load, one at a time, under identical network conditions using Grafana k6.

During testing, we paid close attention to the number of iterations, which told us how many web requests were completed successfully. We also checked 95 percentile scores of the iteration_duration metric – which told us how long it generally took to open the webpage. For instance, if the p95 score was 1.2 seconds, then it meant that 95% of all requests were completed in under 1.2 seconds.

Let’s see the results!

Unoptimized WordPress

In our tests, we found out that our native WordPress instance could serve approximately 4.77K web requests, with an average request taking nearly 2.15 seconds. Upon closer inspection, we found that some requests were completed fairly quickly (1.1 seconds) while others took much longer (3.41 seconds).

That’s not good. Let’s see if using a caching service helps.

Using Redis Full-Page Caching

Using Redis greatly increases the number of web requests served. In addition to a 2x increase in the number of requests, we also see an improvement in 95 percentile scores. The difference between minimum and maximum time taken to complete the web requests was almost 0. This would provide a much more consistent user experience while browsing.

Redis Full-Page Caching test results

Using NGINX FastCGI Caching

While using NGINX’s FastCGI caching, we saw a similar improvement in the number of requests, and 95 percentile scores. Once again, the response times are lower and much closer to each other.

NGINX FastCGI Caching test results

Final Results – Which One To Use

There is no clear winner. Our benchmark results showed that Redis Full-Page Caching outperformed NGINX FastCGI caching in terms of response time and the number of requests served per second – but only by the width of a hair. Both of these options are a significant improvement over native WordPress – our advice is that you can use either of them. 

It’s a no-brainer that using any type of caching is better than not using anything. Not only will it improve the performance of your website, but it will also reduce the load on your web server, allowing you to serve more customers without any additional increase in hosting costs.

Both Redis Full-Page Caching and NGINX FastCGI caching are excellent caching solutions that can significantly improve website speed and performance. However, if you’re using OpenLiteSpeed server, you should also check out our article on LiteSpeed Cache WordPress Plugin.

Transform your server management experience with RunCloud – the ultimate platform for simplifying website maintenance. RunCloud provides out of the box solutions for implementing caching, issuing SSL certificates, and streamlining your workflow. Sign up to RunCloud today to enjoy more control over your servers, automated backups, and robust security features.