Nginx vs. Apache Static File Speeds

People say the Nginx Web Server is extraordinarily good at serving static content. How much faster is it than Apache? I built an interactive web app to find out. [archived]

Published On:   July 15, 2019, 3 p.m.
Last Revised:   Aug. 13, 2020, 2:57 a.m.

Nginx is a very popular web server created by Igor Sysoev in 2004 that can also function as a reverse proxy, load balancer, mail proxy and HTTP cache. It's especially good at serving static content and handling concurrent connections and is therefore used by some of the most popular sites on the web. It's also possible to use Nginx and Apache together, with Nginx functioning as a reverse proxy.

My website uses Nginx primarily because of its speed. How much faster is it than Apache? I built the following app to find out.

This app fetches a Hello World html page from another virtual server I rent from Amazon Web Services. To use this app, fill in how many total requests you would like to make (how many times to fetch the page) and the number of concurrent connections (how many requests to perform at a time).

Note: This page is archived. I couldn't afford to rent another server to run this test. The following results are for 1,000 requests with 100 concurrent connections.


Nginx is appreciably faster, even with only 100 concurrent connections.

Benchmarking is performed with ApacheBench and the graphics are built with D3.js.