NGINX heartbeat

NGINX heartbeat

upstream springboot {

    server 10.3.73.223:8080 max_fails=2 fail_timeout=30s;

    server 10.3.73.223:8090 max_fails=2 fail_timeout=30s;

}

 

server {

    listen       80;

    server_name  localhost;

 

    location /test {

        proxy_pass http://springboot;

    }

}

  

In the 30s (fail_timeout, the default value is 10s), NGINX middleware communication fails twice (max_fails, a default value is set to 0 is considered to have been available server), a middleware is considered unavailable

Not available middleware and communications NGINX success twice in the 30s, is considered middleware recovery.

When upstream of a middleware fails to respond, the request will be forwarded to the next station Nginx middleware, until all of the middleware sent a request, if still unable to get a response at this time successful, the client will receive Finally, a response returned intermediate results.

Guess you like

Origin www.cnblogs.com/hnxxcxg/p/11803523.html