introduceMonitors the health of HTTP servers in the upstream group by sending periodic health checks. Nginx can continuously test your upstream servers, avoid failed servers, and gracefully add recovered servers to the load balancing group. Passive health checkFor passive health checking, Nginx monitors transactions as they occur and attempts to recover failed connections. If the transaction still cannot be recovered, Nginx marks the server as unavailable and temporarily stops sending requests to it until it is marked active again. The conditions under which an upstream server is marked as unavailable are defined for each upstream server via the parameters of the server directive in the upstreams block:
In the following example, Nginx will mark the server as unavailable within 30 seconds if it fails to send a request to the server or does not receive a response from the server 3 times within 30 seconds: upstream backend { server backend1.example.com; server backend2.example.com max_fails=3 fail_timeout=30s; }
Server slow start A recently restored server can easily be overwhelmed with connections, which can cause the server to be marked unavailable again. Slow start allows an upstream server to gradually restore its weight from zero to its nominal value after it is restored or becomes available. This can be done with the upstream backend { server backend1.example.com slow_start=30s; server backend2.example.com; server 192.0.0.1 backup; }
This is the end of this article about Nginx passively checking the survival status of the server. For more relevant content about Nginx checking the survival status of the server, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Example code for using text-align and margin: 0 auto to center in CSS
>>: The iframe frame sets the white background to transparent in IE browser
This article shares the specific code of JavaScri...
No matter how wonderful your personal website is,...
Table of contents 1. Display and hide by default ...
This article describes how to compile and install...
<br />In one year of blogging, I have person...
Table of contents 1. Shallow copy 1. Object.assig...
The datetime type is usually used to store time i...
Table of contents 1. Scene layout 2. Add a handle...
JBoss uses Tomcat as the Web container, so the co...
Effect picture: html: <div class='site_bar...
Table of contents background CommonsChunkPlugin s...
NAT In this way, the virtual machine's networ...
Text Shadow text-shadow: horizontal offset vertic...
Table of contents Registering Components Adding C...
The first one : Copy code The code is as follows: ...