This is an example nginx server that will impact requests that are proxied by it based on provided environment variables
# Launches container that will randomly resets 50% of requests proxied by weight
docker run -dit --name nginx_fracture \
-p 80:80 \
-p 443:443 \
-e ENV_UPSTREAM_RESPONSE_DRP_WEIGHT=100 \
-e ENV_UPSTREAM_RESPONSE_2XX_WEIGHT=100 \
-e ENV_UPSTREAM_ADDR_HTTP=10.10.0.33:80 \
-e ENV_UPSTREAM_ADDR_HTTPS=10.10.0.33:443 \
--restart always rteller/nginx_fracture
# Launches container that will randomly delay 50% of requests proxied between 1000 and 1500 ms
docker run -dit --name nginx_fracture \
-p 80:80 \
-p 443:443 \
-e ENV_UPSTREAM_DELAY_MIN_TIME=1000 \
-e ENV_UPSTREAM_DELAY_MAX_TIME=1500 \
-e ENV_UPSTREAM_DELAY_RATIO=50 \
-e ENV_UPSTREAM_ADDR_HTTP=10.10.0.33:80 \
-e ENV_UPSTREAM_ADDR_HTTPS=10.10.0.33:443 \
--restart always rteller/nginx_fracture
# Launches container that will
## randomly delay 10% of requests proxied between 1000 and 1500 ms
## randomly drop or error a weighted amount of traffic
docker run -dit --name nginx_fracture \
-p 80:80 \
-p 443:443 \
-e ENV_UPSTREAM_DELAY_MIN_TIME=1000 \
-e ENV_UPSTREAM_DELAY_MAX_TIME=1500 \
-e ENV_UPSTREAM_DELAY_RATIO=10 \
-e ENV_UPSTREAM_RESPONSE_DRP_WEIGHT=50 \
-e ENV_UPSTREAM_RESPONSE_2XX_WEIGHT=100 \
-e ENV_UPSTREAM_RESPONSE_5XX_WEIGHT=50 \
-e ENV_UPSTREAM_ADDR_HTTP=10.10.0.33:80 \
-e ENV_UPSTREAM_ADDR_HTTPS=10.10.0.33:443 \
--restart always rteller/nginx_fracture
docker run -dit --name nginx_fracture_trading \
-p 9811:80 \
-e ENV_UPSTREAM_DELAY_MIN_TIME=1000 \
-e ENV_UPSTREAM_DELAY_MAX_TIME=1500 \
-e ENV_UPSTREAM_DELAY_RATIO=100 \
-e ENV_UPSTREAM_RESPONSE_2XX_WEIGHT=100 \
-e ENV_UPSTREAM_ADDR_HTTP=10.1.20.21:9801 \
-e ENV_UPSTREAM_ADDR_HTTPS=10.1.20.21:9801 \
--restart always rteller/nginx_fracture
docker run -dit --name nginx_fracture_www \
-p 9901:80 \
-e ENV_UPSTREAM_DELAY_MIN_TIME=1000 \
-e ENV_UPSTREAM_DELAY_MAX_TIME=1500 \
-e ENV_UPSTREAM_DELAY_RATIO=100 \
-e ENV_UPSTREAM_RESPONSE_2XX_WEIGHT=100 \
-e ENV_UPSTREAM_RESPONSE_5XX_WEIGHT=25 \
-e ENV_UPSTREAM_ADDR_HTTP=10.1.20.21:8001 \
-e ENV_UPSTREAM_ADDR_HTTPS=10.1.20.21:8001 \
--restart always rteller/nginx_fracture
Content type
Image
Digest
Size
75.8 MB
Last updated
over 6 years ago
docker pull rteller/nginx_fracture