Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.13 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.13 KB

Runs nginx dummy for performance testing.

Run in Docker

default ports are 80(http) and 443(https)

Simple mode

docker run -d --name nginx-dummy kisel/nginx-dummy

Getting container internal ip

docker inspect --format '{{ .NetworkSettings.IPAddress }}' nginx-dummy

Privileged mode, no bridge. will use 80 and 443 ports

docker run -d --name nginx-dummy --net="host" kisel/nginx-dummy

To run w/o docker

Root access is required (via sudo) to perform kernel tweaking, extending ulimit -n default ports are defined by follwing env variables:

sudo apt-get install -y nginx
git clone https://github.com/kisel/nginx-dummy.git
cd nginx-dummy
# run nginx. to use defaults just run sh run.sh
env WORKERS=4 HTTP_PORT=7080 HTTPS_PORT=7443 sh run.sh

Additional options

can be specified as env vars

  • LOGGING=error|warn|info|debug - sets nginx error_log filter
  • ACCESS=|1 - enables access logs to /tmp/nginx-dummy./access.log
  • WORKERS= | auto - sets worker_processes. 4 by default

Network tweaks

you may want to run network-tweaks.sh on a host instance to optimize network performance