Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readiness probe #35

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Add readiness probe #35

merged 3 commits into from
Nov 26, 2024

Conversation

RealOrangeOne
Copy link
Contributor

What is the context of this PR?

https://jira.ons.gov.uk/browse/CMS-215

When running in Kubernetes, it needs a way to identify when the application is "ready" to serve requests. This is done using a readiness probe.

There are other probes available, which I've not implemented:

  • "Liveness" probe probably isn't useful to us right now. Application processes are cycled regularly, so shouldn't result in deadlocks. Monitoring external infrastructure here (eg database connectivity) could result in death spirals on external issues.
  • "Startup" probe may potentially be useful to allow the application to be considered "ready" to serve requests sooner, but since the behaviour would be the same as this readiness probe, it can use the same endpoint.

How to review

There are no visible changes, just a new endpoint.

The endpoint has intentionally been designed to be as lightweight as possible. No database queries, no templates, just a functional view.

I've added a set of "internal" URLs under the /-/ prefix. The intention is that these URLs are not externally accessible, and exist only for internal use (monitoring, readiness probes etc). In future, these will be blocked from public use by the infrastructure (somewhere).

Follow-up Actions

Configuring the endpoint to be used is out of scope of this PR.

@RealOrangeOne RealOrangeOne requested a review from a team as a code owner November 21, 2024 10:44
@RealOrangeOne RealOrangeOne changed the title Add readiness probe CMS-215: Add readiness probe Nov 22, 2024
@MebinAbraham MebinAbraham changed the title CMS-215: Add readiness probe Add readiness probe Nov 22, 2024
@sanjeevz3009 sanjeevz3009 self-requested a review November 22, 2024 15:39
@RealOrangeOne RealOrangeOne merged commit fc9a314 into main Nov 26, 2024
7 checks passed
@RealOrangeOne RealOrangeOne deleted the 215-readiness-probe branch November 26, 2024 09:59
Copy link
Contributor

@sanjeevz3009 sanjeevz3009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants