Nginx vs Apache: Speed test

Posted by: mstauber Category: General

Here is a direct comparison between HTTPS via Apache and HTTPS via the Nginx-Proxy, using HTTP/2.

Now that we have released the BlueOnyx 5209R update that allows to use Nginx as HTTPS-Proxy I thought I'd share a direct comparison about the difference it makes.

The test page? This one. Let us start with testing the page while Apache is serving HTTPS.

Apache via HTTPS, using HTTP/1.1:

Total load time: About 1.8 seconds.

Nginx as HTTPS-Proxy, using HTTP/2:

Total load time: About 1.45 seconds.

As you can see: Between seconds 0.75 and 1.10 Nginx started to deliver all content of the page, although it took a moment for it to complete.

Apache on the other hand needed until second 0.78 until the index.php had been sent out and the loading of additional resources kicked off in a staggered and ragtag fashion. The tiny 'external.gif' (0.3kb) alone needed 611ms until it had been delivered. Worse: The stylesheet didn't even start to transfer until 1752ms into the transaction and then needed another 55ms until it was transfered. As you can also see, the "wait time" and "receive" time for all transactions also seems to be shorter with Nginx than with Apache.

So all in all it's pretty clear why even such an unoptimized page such as ours feels much faster with Nginx and HTTP/2 as SSL proxy than using Apache and HTTP/1.1 straight up for it.


Return
General
Apr 17, 2018 Category: General Posted by: mstauber
Next page: Features