Description
We have 3 separate kinds of healthchecks and heartbeat endpoints in addons-server:
- External healthcheck uses https://addons.mozilla.org/services/monitor.json which checks a bunch of monitors
- Internal
__heartbeat__ endpoint that is used for kubernetes to check a pod is ready
- Internal
__lbheartbeat__ endpoint that is used for kubernetes to check a pod is healthy
That last one is just implemented with a middleware that just returns 200, it's fairly minimal. But the middle one, that is still used to check for readiness when spawning pods, makes a call to the database, to elasticsearch, tries to use PIL... that's a lot of CPU wasted, and a lot of connections to the outside world. When elasticsearch or the database are not healthy, it's pointless to consider the pods not ready and try to spawn new ones...
We should look into implementing __heartbeat__ just like __lbheartbeat__.
Acceptance Criteria
┆Issue is synchronized with this Jira Task
Description
We have 3 separate kinds of healthchecks and heartbeat endpoints in addons-server:
__heartbeat__endpoint that is used for kubernetes to check a pod is ready__lbheartbeat__endpoint that is used for kubernetes to check a pod is healthyThat last one is just implemented with a middleware that just returns 200, it's fairly minimal. But the middle one, that is still used to check for readiness when spawning pods, makes a call to the database, to elasticsearch, tries to use
PIL... that's a lot of CPU wasted, and a lot of connections to the outside world. When elasticsearch or the database are not healthy, it's pointless to consider the pods not ready and try to spawn new ones...We should look into implementing
__heartbeat__just like__lbheartbeat__.Acceptance Criteria
┆Issue is synchronized with this Jira Task