Plesk and NGINX Reverse Proxy: Impact on performance

By default, Plesk uses NGINX as a reverse proxy for Apache. But is this default configuration optimal? What impact does it have on performance? To answer these questions, I carried out load tests on a Hetzner VPS (8 AMD Epyc cores) to measure the impact of enabling NGINX as a reverse proxy on overall performance.

Context and configuration

As part of this benchmark, I compared server performance with NGINX enabled and disabled. I also tested NGINX cache activation (and that changes everything!).

Load tests were carried out using ApacheBench (ab), sending 5000 requests locally with a concurrency of 200 simultaneous requests. This ensured that the test lasted long enough to limit the margin of error. It should be noted that the test site is very light and high-performing compared with the average, with only 50 to 80ms TTFB (response time).

Here are the main configurations:

  • Server 8-core Hetzner VPS (AMD Epyc)
  • Web server Plesk 18.0.65 with Apache + NGINX as reverse proxy
  • Test site : LRob.fr a WordPress FSE website, Twenty Twenty-Four theme with Breeze cache
  • Test commands : ab -n 5000 -c 200 https://www.lrob.fr/

NGINX configurations

Performance test results

NginxTotal time for 5000 requestsRequests per secondAverage time per requestTransfer ratePerformance
Activated9.400 s531.94375.984 ms16 572.67 Kb/s100%
Off7.045 s709.74281.794 ms22 130.80 Kb/s133.42%
Enabled (static cache)5.734 s884.26226.177 ms27567.59166.24%

Analysis: Impact of NGINX on performance

With the default configuration (NGINX enabled), the server operates correctly, but a CPU bottleneck was observed. Overall CPU utilization (all cores) did not exceed 85 % in the load test, with the NGINX process also bottlenecked around 85%.

Without NGINX, Apache handles requests directly. The results show a +33% improvement in performance.

But the surprise is when the NGINX cache is activated and manages static files directly. Performance gains of +66%! And that's not all: we've also seen a reduction in CPU core utilization to 30%, leaving plenty of CPU available for other essential uses such as PHP-FPM or MariaDB/MySQL. NGINX, however, is limited to 99% CPU usage (i.e. one core): Perhaps it's possible to extend its use to several CPU cores and boost results even further. At the time of testing, I still had 5 to 6 CPU cores available, enough to potentially multiply this result by 2 or 3. This is worth investigating further.

Other considerations concerning NGINX and Plesk

Plesk favors the use of NGINX with several advantages that may justify its activation:

  • Enhanced certificate generation For example, Plesk allows you to generate a certificate for webmail only, when NGINX is in place.
  • Security Functions such as OCSP Stapling are available in 1 click, only with NGINX.

I may be missing other advantages. The disadvantage is, of course, that you then have two web applications, which slightly increase the complexity of the installation.

Conclusion

Using NGINX as a reverse proxy under Plesk can be extremely powerful for static sites, or when combined with a good caching system (see cache comparison for WordPress). But according to my test, it is essential to modify the NGINX settings to obtain a performance gain rather than a reduction compared to Apache alone.

What's more, results can vary greatly depending on your end-applications (your sites) and their caches. If necessary, use my test methodology to make your own measurements and comparisons. I'm interested in your feedback: share your results in the comments!

Categories

Specialized WordPress hosting

Convenient, free, fast and secure

WordPress websites
WordPress, Best CMS for 20 years

Much more than traditional hosting: benefit from simplified management and security tools for WordPress. With expert support included!

WordPress Webmaster

Professional Webmastering by a WordPress Specialist in Orleans
Secure Hosting Included

WordPress websites

Entrust your site to a WordPress specialist, WordPress security expert

Nextcloud hosting

Maintenance included

Nextcloud
The best free collaborative suite

Work efficiently, control your data