From 0e8b6eb506de431a626244fc8ec0b727adcb1202 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 16 Feb 2022 02:27:04 +0100 Subject: [PATCH] Update nginx config --- nginx/nginx.conf | 28 ++++++++++++++-------------- nginx/proxy.conf | 8 ++++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 61d4441..a3931eb 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -37,7 +37,7 @@ http { error_log /dev/null crit; upstream backend_GET { - ip_hash; + least_conn; #keepalive 5; #server localhost:4441; @@ -48,22 +48,22 @@ http { #server localhost:4446; #server localhost:4447; #server localhost:4448; - server 10.0.0.4:4441; + server 10.0.0.4:4441 max_fails=3 fail_timeout=60s; - #server 10.0.0.3:4441; - server 10.0.0.3:4442; + #server 10.0.0.3:4441 max_fails=3 fail_timeout=60s; + #server 10.0.0.3:4442 max_fails=3 fail_timeout=60s; - server 10.0.0.5:4441; - server 10.0.0.5:4442; + server 10.0.0.5:4441 max_fails=3 fail_timeout=60s; + server 10.0.0.5:4442 max_fails=3 fail_timeout=60s; - server 10.0.0.6:4441; - server 10.0.0.6:4442; + server 10.0.0.6:4441 max_fails=3 fail_timeout=60s; + server 10.0.0.6:4442 max_fails=3 fail_timeout=60s; - server 10.0.0.9:4441; - server 10.0.0.9:4442; + server 10.0.0.9:4441 max_fails=3 fail_timeout=60s; + server 10.0.0.9:4442 max_fails=3 fail_timeout=60s; - server 10.0.0.10:4441; - server 10.0.0.10:4442; + server 10.0.0.10:4441 max_fails=3 fail_timeout=60s; + server 10.0.0.10:4442 max_fails=3 fail_timeout=60s; #server 134.209.69.251:80 backup; @@ -73,11 +73,11 @@ http { upstream backend_POST { #server localhost:4441; #server localhost:4442; - server 10.0.0.3:4441; + server 10.0.0.3:4441 max_fails=3 fail_timeout=10s; #server 10.0.0.3:4442; } upstream backend_db { - server 10.0.0.4:4441; + server 10.0.0.4:4441 max_fails=1 fail_timeout=3s; #server 10.0.0.3:4441; #server 10.0.0.4; } diff --git a/nginx/proxy.conf b/nginx/proxy.conf index 081af02..fb40ada 100644 --- a/nginx/proxy.conf +++ b/nginx/proxy.conf @@ -5,8 +5,8 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Connection ""; client_max_body_size 10m; client_body_buffer_size 128k; -proxy_connect_timeout 10; -proxy_send_timeout 10; -proxy_read_timeout 10; +#proxy_connect_timeout 10; +#proxy_send_timeout 10; +#proxy_read_timeout 10; proxy_buffers 32 4k; -proxy_http_version 1.1; \ No newline at end of file +proxy_http_version 1.1;