Plesk and NGINX Reverse Proxy: Impact on Performance

|

|

By default, Plesk uses NGINX as a reverse proxy in front of Apache. But is this default configuration optimal? What is the impact on performance? To answer these questions as a web host that uses Plesk, I ran load tests on a Hetzner VPS (8 AMD Epyc cores) to measure the impact of enabling NGINX…



By default, Plesk uses NGINX as a reverse proxy in front of Apache. But is this default configuration optimal? What is the impact on performance? To answer these questions as a web host that uses Plesk, I ran load tests on a Hetzner VPS (8 AMD Epyc cores) to measure the impact of enabling NGINX as a reverse proxy on overall performance.

Background and Setup

For this benchmark, I compared the server’s performance with NGINX enabled and disabled. I also tested enabling the NGINX cache (and it changes everything!).

The load tests were run with ApacheBench (ab), sending 5,000 requests locally with 200 concurrent requests. This keeps the test running long enough to limit the margin of error. Note that the test site is very light and fast compared to the average, with a TTFB (response time) of only 50 to 80 ms.

Here are the main settings:

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

NGINX Configurations

Performance Test Results

NginxTotal time for 5,000 requestsRequests per secondAverage time per requestTransfer ratePerformance
Enabled9.400 s531.94375.984 ms16,572.67 KB/s100%
Disabled7.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 works fine, but a CPU bottleneck was observed. Overall CPU usage (all cores) never exceeds 85% during the load test, and the NGINX process itself is also capped at around 85%.

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

But the real surprise comes when the NGINX cache is enabled and serves static files directly. Performance improves by 66%! And that’s not all: CPU core usage also drops to 30%, leaving plenty of CPU headroom for other essential workloads like PHP-FPM or MariaDB/MySQL. NGINX is however capped at 99% CPU usage (so, one core): it may be possible to spread it across several CPU cores and improve results even further. During the test, I still had 5 to 6 CPU cores available, which could potentially multiply this result by 2 or 3. This deserves further study.

Other Considerations Regarding NGINX and Plesk

Plesk encourages the use of NGINX, with several advantages that may justify enabling it:

  • Improved certificate generation: for example, Plesk can generate a certificate for webmail only, but just when NGINX is in place.
  • Security: features like OCSP Stapling are available in one click, with NGINX only.

There may be other advantages I’m missing. The downside, of course, is that you then have two web applications, which slightly increases the complexity of the setup.

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 the WordPress cache plugin comparison). But according to my test, you need to change the NGINX settings to get a performance gain rather than a loss compared to Apache alone.

Also, results can vary widely depending on your final applications (your sites) and their caching. If needed, use my test methodology to run your own measurements and compare. On that note, I’d love to hear from you: share your results in the comments!

Either way, for power comparable to a dedicated server at shared hosting prices, check out LRob’s plans to host your website or host your web agency or your many sites.

Categories

Web Hosting

Succeed on the web

Security, performance, simplicity.
The best tools to serve you.

Nextcloud Hosting

Nextcloud

The best open source collaboration suite

Maintenance Included

WordPress Specialist Webmaster

WordPress website management

WordPress specialist webmaster in Orléans

Entrust your site to a WordPress security and maintenance expert

Hacked WordPress Site Repair

angry-hacker-pirate

Is your WordPress site hacked?

Repair and lasting security for your WordPress site.