forked from zanfranceschi/rinha-de-backend-2024-q1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
37 lines (30 loc) · 805 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
events {
worker_connections 10000;
}
http {
access_log off;
# Cache open file descriptors
open_file_cache max=2000 inactive=20s;
open_file_cache_valid 60s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
upstream api {
server unix:/tmp01/api_01.sock max_fails=1 fail_timeout=9999m;
server unix:/tmp02/api_02.sock max_fails=1 fail_timeout=9999m;
server localhost:8081 backup;
server localhost:8082 backup;
}
server {
listen 9999;
http2 on;
location / {
proxy_pass http://api;
error_page 502 503 504 @fallback;
proxy_buffering off;
}
location @fallback {
proxy_pass http://api;
proxy_buffering off;
}
}
}