forked from mtusi2026/mtusi2026lab3
feat: полная реализация
This commit is contained in:
+21
-8
@@ -1,11 +1,24 @@
|
||||
frontend http-in
|
||||
bind *:8080
|
||||
default_backend api_servers
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 4096
|
||||
|
||||
backend api_servers
|
||||
defaults
|
||||
mode http
|
||||
log global
|
||||
option httplog
|
||||
timeout connect 5s
|
||||
timeout client 30s
|
||||
timeout server 30s
|
||||
retries 2
|
||||
|
||||
frontend http_front
|
||||
bind *:8080
|
||||
default_backend api_back
|
||||
|
||||
backend api_back
|
||||
balance roundrobin
|
||||
option httpchk GET /health
|
||||
server api1 api1:8080 check inter 3s fall 3 rise 2
|
||||
server api2 api2:8080 check inter 3s fall 3 rise 2
|
||||
|
||||
http-request set-header X-Instance-Id %[req.hdr(X-Instance-Id)]
|
||||
http-check expect status 200
|
||||
default-server inter 3s fall 3 rise 2
|
||||
server api1 api1:8080 check
|
||||
server api2 api2:8080 check
|
||||
|
||||
Reference in New Issue
Block a user