{"push_id":686181402,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"cf1e31b12d562a0e5e24e96b05fd22bf808ec740","before":"55d17dfacd07927ddd3265da8b2b7da04b7caf0f","commits":[{"sha":"f044c43d6eb7e757a644376693e26677724907e0","author":{"email":"23f36105ed28b51cd4b5160b8912d2fa50250cb0@deckle.co.uk","name":"Oskar Pearson"},"message":"[add_ping_endpoint] Add /ping endpoint\n\nTo determine whether a server is up and running, we need an endpoint URL that\nload balancers can poll periodically.\n\nI consider this separate from a healthcheck endpoint. The healthcheck endpoint\ngives us information about whether any of the dependent services are up and\nrunning or not, and is a more in-depth check. The healthcheck can be useful for\ndiagnosing system problems / monitoring.\n\nThere are arguments for-and-against doing an exhaustive check on the load\nbalancer, but let me give one specific example:\n\nLet's say that the app can send email as part of it's functionality. However,\n99% of app usage by the public doesn't use that feature - it's only a small part\nof the functionality.\n\nIf the mail server goes down, we want the app to remain up and running, even\nthough some portion of functionality is temporarily unavailable.\n\nWhat we *don't want* is for the load balancer and autoscaling to consider all\nservers to be unavailable if the mail server is down, and immediately start\nrotating machines out of service and replacing them. That would take down the\nwhole website until the mail server comes back online.\n\nSo, I propose having two endpoints:\n\n- *ping* - which is whether the web server is up or not. This is what\n  the load balancer uses to determine if things are up and running\n- *healthcheck* - a more detailed set of tests that can be used\n  to determine if some portion of functionality is unavailable.\n  That could be something closer to https://github.com/alphagov/e-petitions/pull/76/files\n\nI've done the ping endpoint at the rails level, rather than at the Rack level\nbecause we want the rails app to be functioning before we consider it 'in\nrotation' for the load balancer. This does mean we probably have one external\ndependency as part of the app state - the availability of the database.","distinct":true,"url":"https://api.github.com/repos/alphagov/e-petitions/commits/f044c43d6eb7e757a644376693e26677724907e0"},{"sha":"cf1e31b12d562a0e5e24e96b05fd22bf808ec740","author":{"email":"378ef3e7f140926a1b45e233cf8a3a5b6f1bde10@users.noreply.github.com","name":"Andrew White"},"message":"Merge pull request #103 from oskarpearson/add_ping_endpoint\n\nAdd /ping endpoint","distinct":true,"url":"https://api.github.com/repos/alphagov/e-petitions/commits/cf1e31b12d562a0e5e24e96b05fd22bf808ec740"}]}