I'm configuring a failover server tasked to accept any incoming request, and reply with blank 200 response. The idea is to minimize the reply time and to ensure we dont send any 40x or 50x.
I tried using return 200;
for the desired locations within Nginx, but my monitoring systems (Pingdom) didn't like the response, and consider the server not responding.
Is there a better way to do this, of course with minimal overhead on the server?
You can have nginx return back an empty HTTP 200 by a config block like:
You can uncomment the
access_log
line if you dont want all those health checks to be logged.HTTP status code
204 No Content
is meant to say "I've completed the request, but there is no body to return":