0
0
Nginxdevops~5 mins

Health checks in Nginx - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a health check in the context of NGINX?
A health check is a process where NGINX regularly tests backend servers to see if they are working properly before sending traffic to them.
Click to reveal answer
beginner
How does NGINX decide to stop sending traffic to a backend server?
NGINX stops sending traffic to a backend server if the health check fails, meaning the server did not respond correctly or on time.
Click to reveal answer
intermediate
Which NGINX directive is used to enable active health checks?
The directive 'health_check' inside the 'upstream' block enables active health checks in NGINX Plus.
Click to reveal answer
intermediate
What is the difference between active and passive health checks in NGINX?
Active health checks send regular test requests to servers. Passive health checks watch real traffic and mark servers unhealthy if errors happen.
Click to reveal answer
intermediate
Write a simple NGINX upstream block with a health check enabled for two backend servers.
upstream backend { server backend1.example.com; server backend2.example.com; health_check; }
Click to reveal answer
What happens if a backend server fails a health check in NGINX?
ANGINX stops sending traffic to that server.
BNGINX restarts the server automatically.
CNGINX sends more traffic to that server.
DNGINX ignores the failure and continues.
Which NGINX version supports active health checks natively?
ANGINX Open Source
BNGINX Plus
CBoth versions
DNeither version
What type of request does an active health check usually send?
AA special test request like HTTP GET to a health endpoint
BA normal user request
CA database query
DA DNS lookup
What is passive health checking based on?
AServer uptime logs
BRegular test requests sent by NGINX
CManual server checks
DMonitoring real user traffic and errors
Where do you configure health checks in NGINX?
AInside the server block
BInside the location block
CInside the upstream block
DIn the http block only
Explain how NGINX uses health checks to improve reliability.
Think about how NGINX decides which servers to send traffic to.
You got /3 concepts.
    Describe how to configure a simple active health check in NGINX Plus.
    Focus on the configuration syntax inside the upstream block.
    You got /3 concepts.