Skip to content

[Task]: Simplify AMO's __heartbeat__ endpoints #16297

Description

@diox

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

  • item 1

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions