[TOP-2] Add endpoint for health checking #3270
Labels
Cleanup/Done?
Codebase: API
Indicates issue work will be in API
Devops
linear
Needs: triage
Theme: SaaS
Milestone
For load balancers to properly operate with the API, it's necessary to have a designated health check endpoint. In its most basic form, this can be a simple route that simply returns "OK" (or
{ "health": "OK" }
if we are so inclined to have JSON everywhere). What matters to the load balancer is the HTTP response status (usually 200 is expected)The trick in our case is this: the load balancer will not provide any hostname in the HTTP request (remember HTTP version 1.0?). This means that the request will be handled by the default virtual host in nginx , and that the PHP code will not receive any hostname header. This is relevant for our platform cloud hosting, where we always expect to know if the request is coming for deployment1.ushahidi.io or deployment2.ushahidi.io .
The health check route can't depend on any of that.
USH-642
The text was updated successfully, but these errors were encountered: