This project will use docker to build an Apache and Nginx version of a codebase for synthetic benchmarking.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

NGINX and Apache Comparison Tool

This tool is useful for testing the differences betwen Nginx and Apache by having the same PHP based website being served up by both webservers. I have been using this tool to demonstrate/test the handling of large bursts of incoming requests.

Here is a video of me using the tool.

Optimizing Nginx for your core count

The Nginx configuration has been optimized for a dual core server. If you want to test against a larger core count, then please adjust the nginx/php-fpm-pool.conf file so that pm.max_children is set to your number of cores x 2.


Clone the repository.

git clone

Navigate to within the folder and build the images by executing the build script I created for you.


When that has finished, deploy your nginx and apache webservers by executing the deploy script.


Now you can stress test the different webservers using the Apache Bench tool. Remember that nginx responds on port 8080 and Apache responds on port 8000.


# Apache - burst of 100 requests
ab -n 100 -c 100

# Nginx - burst of 100 requests
ab -n 100 -c 100

It is also worth noting that after testing the Apache webserver, a lot of memory will be left over still being utilized so I re-deploy (by executing bash before running the tests on Nginx.