Last active
April 19, 2021 08:39
-
-
Save mikhailov/ed06de16ba2757d66f2f59c867d51fdd to your computer and use it in GitHub Desktop.
Troubleshooting Application Performance and Slow TCP Connections with NGINX Amplify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream upstream_close_server_keepalive_timeout_0 { | |
server upstream:10443; | |
} | |
upstream upstream_keepalive_server_keepalive_timeout_0 { | |
server upstream:11443; | |
keepalive 64; | |
} | |
upstream upstream_close_server_keepalive_timeout_300 { | |
server upstream:12443; | |
} | |
upstream upstream_keepalive_server_keepalive_timeout_300 { | |
server upstream:13443; | |
keepalive 64; | |
} | |
upstream upstream_heavy_loaded { | |
server upstream:443; | |
} | |
upstream upstream_keepalive_heavy_loaded { | |
server upstream:443; | |
keepalive 64; | |
} | |
server { | |
listen 80; | |
### Part 1. Benchmark A | |
# siege -b -t 10m http://127.1/upstream-close/proxy_pass_connection-close/server_keepalive_timeout-0 | |
### | |
location =/upstream-close/proxy_pass_connection-close/server_keepalive_timeout-0 { | |
proxy_pass https://upstream_close_server_keepalive_timeout_0/; | |
} | |
### Part 1. Benchmark B | |
# siege -b -t 10m http://127.1/upstream-close/proxy_pass_connection-keepalive/server_keepalive_timeout-0 | |
### | |
location =/upstream-close/proxy_pass_connection-keepalive/server_keepalive_timeout-0 { | |
proxy_pass https://upstream_close_server_keepalive_timeout_0/; | |
proxy_set_header Connection ""; | |
proxy_http_version 1.1; | |
} | |
### Part 1. Benchmark C | |
# siege -b -t 10m http://127.1/upstream-close/proxy_pass_connection-keepalive/server_keepalive_timeout-300 | |
### | |
location =/upstream-close/proxy_pass_connection-keepalive/server_keepalive_timeout-300 { | |
proxy_pass https://upstream_close_server_keepalive_timeout_300/; | |
proxy_set_header Connection ""; | |
proxy_http_version 1.1; | |
} | |
### Part 1. Benchmark D | |
# siege -b -t 10m http://127.1/upstream-keepalive/proxy_pass_connection-keepalive/server_keepalive_timeout-0 | |
### | |
location =/upstream-keepalive/proxy_pass_connection-keepalive/server_keepalive_timeout-0 { | |
proxy_pass https://upstream_keepalive_server_keepalive_timeout_0/; | |
proxy_set_header Connection ""; | |
proxy_http_version 1.1; | |
} | |
### Part 1. Benchmark E | |
# siege -b -t 10m http://127.1/upstream-keepalive/proxy_pass_connection-keepalive/server_keepalive_timeout-300 | |
### | |
location =/upstream-keepalive/proxy_pass_connection-keepalive/server_keepalive_timeout-300 { | |
proxy_pass https://upstream_keepalive_server_keepalive_timeout_300/; | |
proxy_set_header Connection ""; | |
proxy_http_version 1.1; | |
} | |
### Part 2. Benchmark A | |
# siege -b -t 20m http://127.1/upstream-heavy-loaded-close | |
### | |
location =/upstream-heavy-loaded-close/ { | |
proxy_pass https://upstream_heavy_loaded/; | |
} | |
### Part 2. Benchmark B | |
# siege -b -t 20m http://127.1/upstream-heavy-loaded-keepalive/ | |
### | |
location =/upstream-heavy-loaded-keepalive/ { | |
proxy_pass https://upstream_keepalive_heavy_loaded/; | |
proxy_set_header Connection ""; | |
proxy_http_version 1.1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 10443 ssl; | |
server_name _; | |
location =/ { | |
keepalive_timeout 0; | |
empty_gif; | |
} | |
} | |
server { | |
listen 11443 ssl; | |
server_name _; | |
location =/ { | |
keepalive_timeout 0; | |
empty_gif; | |
} | |
} | |
server { | |
listen 12443 ssl; | |
server_name _; | |
location =/ { | |
keepalive_timeout 300; | |
keepalive_requests 100000; | |
empty_gif; | |
} | |
} | |
server { | |
listen 13443 ssl; | |
server_name _; | |
location =/ { | |
keepalive_timeout 300; | |
keepalive_requests 100000; | |
empty_gif; | |
} | |
} |
Author
mikhailov
commented
Oct 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment