nginx 长连接 健康检查 request_id
upstream test { server 10.10.10.10:5800; server 10.10.10.11:5800; server 10.10.10.12:5800; keepalive 512; check interval=3000 rise=2 fall=3 timeout=1000 type=http; check_keepalive_requests 100; check_http_send "GET /actuator/health/ HTTP/1.0\r\nConnection: keep-alive\r\n\r\n"; check_http_expect_alive http_2xx http_3xx; } server { listen 80; server_name test.xueanguo.com; access_log /data/nginx_log/access.log json buffer=16k; error_log /data/nginx_log/error.log; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Request-ID $request_id; proxy_http_version 1.1; proxy_set_header Connection ""; location /health_status { check_status; access_log off; } location / { proxy_pass http://test; } }
不忘初心,才能始终
浙公网安备 33010602011771号