-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathnginx.conf
38 lines (30 loc) · 895 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
worker_processes auto;
events {
worker_connections 1024;
}
http {
sendfile on;
# to boost I/O on HDD we can disable access logs
access_log off;
# allow the server to close connection on non responding client, this will free up memory
reset_timedout_connection on;
# don't buffer data sent, good for small data bursts in real time
tcp_nodelay off;
# if client stop responding, free up memory -- default 60
send_timeout 2;
upstream api {
server api01:3000;
server api02:3000;
keepalive 384; # worker_connections / upstreams * 0.75
}
server {
listen 80;
location / {
proxy_pass http://api;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Proxy-Connection "keep-alive";
}
}
}