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

Adds a simple healthcheck endpoint for the requests service #747

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

kenoir
Copy link
Contributor

@kenoir kenoir commented Jan 25, 2024

What does this change?

This change follows #739, and adds an HTTP healthcheck to the requests API to ensure the Scala service has started before it is registered healthy at the NLB and starts serving requests.

A further change will need to be made in the wellcomecollection/identity respository to have the identity infrastructure pay attention to the new endpoint.

The required change will be similar to the one in this repository to add a HTTP healthcheck.

See wellcomecollection/identity#398

How to test?

  • Deploy this change to stage to ensure the terraform applies the change as expected and tasks register as healthy
  • Perform a stage deployment while sending requests to understand if we have eliminated any deployment errors.

How can we measure success?

No downtime during deployments resulting in a better experience for visitors to the site, and fewer errors that we cannot effectively respond to in the alerts channel.

@kenoir kenoir changed the title Adds a simple healthcheck endpoint for the items service Adds a simple healthcheck endpoint for the requests service Jan 25, 2024
@kenoir kenoir requested a review from a team January 25, 2024 14:38
@kenoir kenoir linked an issue Jan 25, 2024 that may be closed by this pull request
13 tasks
Base automatically changed from rk/add-healthcheck-endpoint-items to main January 25, 2024 14:40
@kenoir kenoir force-pushed the rk/add-healthcheck-endpoint-requests branch from 4d3db3b to c137f3f Compare January 26, 2024 09:57
@kenoir kenoir marked this pull request as ready for review January 26, 2024 09:57
This change adds a healthcheck endpoint to provide to a loadbalancer for the purposes of checking application health at deployment and under normal service.
@kenoir kenoir force-pushed the rk/add-healthcheck-endpoint-requests branch from c939911 to a06ba85 Compare January 26, 2024 10:53
@kenoir kenoir requested a review from a team January 26, 2024 10:53
@kenoir kenoir enabled auto-merge January 26, 2024 10:53
return asyncHandler(async (req, res) => {
res.status(200).json({
status: "ok",
config,
Copy link
Contributor

Choose a reason for hiding this comment

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

When I saw this, I was slightly concerned that it might be a vector for leaking secrets.

It isn't, but is there a risk that someone might unwittingly expose something in the future by adding it to the config?

@kenoir kenoir merged commit b40df4d into main Jan 26, 2024
1 check passed
@kenoir kenoir deleted the rk/add-healthcheck-endpoint-requests branch January 26, 2024 11:00
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.

Meaningful ECS service health checks
3 participants