Skip to content

TECH-17408: Start healthcheck server earlier#3

Merged
gwynethallwright merged 1 commit intorelease/0.49.x-invocafrom
TECH-17408_start_healthcheck_server_faster
Apr 17, 2025
Merged

TECH-17408: Start healthcheck server earlier#3
gwynethallwright merged 1 commit intorelease/0.49.x-invocafrom
TECH-17408_start_healthcheck_server_faster

Conversation

@gwynethallwright
Copy link

This PR makes a small adjustment to the part of the code that initializes a health check server on port 8080. When queried, the health check server will attempt to reach out to Consul and ask who the leader of the cluster is. We use this endpoint to set up probes as part of our consul-sync Kubernetes Deployment.

The problem with the above is that, with the addition of resource.PopulateInitialServices() coming from #2, we are taking a variable (but longer) amount of time to get to the point in the code where we would usually initialize the health check server. This is not ideal, because if we take too long, the Kubernetes probes will cause our Pods to restart.

In this PR, we set up the health check server much earlier — just after setting up the Consul client that is necessary in order to perform the health checks.

@gwynethallwright gwynethallwright requested a review from a team April 16, 2025 17:35
Copy link

@lhaven-invoca lhaven-invoca left a comment

Choose a reason for hiding this comment

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

@gwynethallwright gwynethallwright merged commit 5c5e913 into release/0.49.x-invoca Apr 17, 2025
0 of 5 checks passed
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.

2 participants