forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
44 lines (37 loc) · 993 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
39
40
41
42
43
44
worker_processes auto;
worker_rlimit_nofile 500000;
events {
use epoll;
worker_connections 1024;
}
http {
access_log off;
error_log /dev/null emerg;
upstream api1 {
server localhost:5001;
keepalive 200;
}
upstream api2 {
server localhost:5002;
keepalive 200;
}
server {
listen 9999;
location ~ /clientes/(1|2|3)/ {
proxy_buffering off;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Keep-Alive "";
proxy_set_header Proxy-Connection "keep-alive";
proxy_pass http://api1;
}
location ~ /clientes/(4|5)/ {
proxy_buffering off;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Keep-Alive "";
proxy_set_header Proxy-Connection "keep-alive";
proxy_pass http://api2;
}
}
}