http://nginx.org/en/docs/http/ngx_http_upstream_module.html#health_check Alternative suggestions are welcome :) but I'm sure this can be tackled with Lua. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253893,253895#msg-253895