tataweb

Rocket-Nginx + WP-Rocket: What are the Benefits?

rocket nginx

Must read:

Ferdian Alfianto

Ferdian Alfianto

Ferdian Alfianto is an Internet enthusiast, Mac Lover; likes using Wordpress, experimenting with Linux (especially Debian and Ubuntu), tinkering with pfSense routers, happy experimenting with LEMP (Linux, Nginx, MariaDB, PHP) and Redis. You can contact me here.

What is that Rocket-Nginx? Rocket-Nginx is a configuration add-on to Nginx for the WordPress cache plugin, WP-Rocket.

The developer claims that by injecting the Rocket-Nginx configuration, then page cache which has been created by WP-Rocket will be sent directly to visitors without having to call WordPress or PHP. If this is the case, then we can be sure that if only Nginx is working, it will lighten server performance and can increase server stability.

However, is the developer's claim true? That's why I did a test with the conditions before and after using Rocket-Nginx.

Before Using Rocket-Nginx

For this test I created a server on OVH; install Nginx, MySQL, PHP 7.4, WordPress, Zakra Theme + WP-Rocket.

And if we test with Curl, the result without Rocket-Nginx will be like this:

No Rocket-Nginx

And for the test, I use Loader.io services, with 250 clients. And the test results are as follows:

Loader.io test results without Rocket-Nginx

We can see that the PHP process is quite high, even though the webserver uses Nginx. To send the page cache to visitors, it still requires PHP intervention.

After Using Rocket-Nginx

If we have injected the Rocket-Nginx configuration into Nginx, the curl result will be as follows:

With Rocket-Nginx

You can see that an additional header will appear in the form "X-Rocket-Nginx-Serving-Static: Yes". If what appears is Yes, then the page cache is successfully handled by Nginx and will be sent to the visitor without any PHP process. However if No., then it is the opposite, Nginx still uses PHP interference. But this only applies to page cache only, for other static files such as css, js, images, etc .; then what appears is confirmed to be No.

Same as the previous test, I used Loader.io with 250 clients, and the results are as follows:

With Rocket-Nginx, only 2 PHP processes exit and even then it doesn't work, because you can see the number resource CPU used 0 percent. Nginx is the one who sends it page cache to visitors, according to the claims mentioned by the developer.

Conclusion

Using Rocket-Nginx is highly recommended if you are using Nginx & WP-Rocket for your WordPress site. Use resource CPU is much less, so that is certain the server will be more stable and able to runhandle more visitors.

If you are interested in installing Rocket-Nginx, please visit this page.

Share on facebook
Facebook
Share on twitter
Twitter
Share on whatsapp
WhatsApp
Share on telegram
Telegram
Share on email
E-mail

Latest articles:

MongoDB logo
Linux

Easy to Install MongoDB on Ubuntu 20.04

This tutorial explains how to install and configure MongoDB Community Edition on Ubuntu 20.04. MongoDB is a free, open-source document database. Belongs to the so-called database family

Related article:

MongoDB logo

Easy to Install MongoDB on Ubuntu 20.04

This tutorial explains how to install and configure MongoDB Community Edition on Ubuntu 20.04. MongoDB is a free, open-source document database. Belongs to the so-called database family

domain

The World's Cheapest Domain Hunt!

The cheapest domain, who doesn't love getting it? Yes, even the author of this blog loves to hunt for cheap domains :). Frequently questions are asked to the author,

Web Security

13 Easy Tips to Secure Your WordPress Site

The popularity of WordPress is a success, but it comes with consequences. More than 34% sites are built using the WordPress platform, of course this leaves WordPress sites vulnerable