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
1. Slow query log 1.1 MySQL log types Logs are us...
js realizes the special effect of clicking and dr...
Table of contents Preface text 1. Install styleli...
Element UI implements multiple tables scrolling a...
The default ssh port number of Linux servers is g...
1. Uninstalling MySQL 5.7 1.1查看yum是否安裝過mysql cd y...
Preview of revised version This article was writt...
The application scenario is: the iframe page has n...
Friends who have some basic knowledge of SQL must...
1. Command Introduction The ln command is used to...
I just finished installing MySQL 5.7.19 in the ea...
We often see a cool effect where the mouse hovers...
Table of contents Preface 1. Props, $emit one-way...
Configuration steps 1. Check whether DNS is confi...
This article example shares the specific code of ...