new_relic_ping
new_relic_ping copied to clipboard
Add a `/live` monitor for load balancing
A common deployment pattern is to have multiple application servers behind a load balancer such as nginx or haproxy. HAproxy in particular provides an httpcheck URL, and if that http call doesn't return a successful response, the server will be taken out of rotation.
Addition of a /live
route which performs will return an okay
response if the individual application server is available AND if it should be included in the live application pool.
Implementation plan:
I've used in existing production setup's a flag file in the application tmp directory, which makes enabling or disabling as easy as touch tmp/LIVE
or rm tmp/LIVE