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 ability to check backend readiness #372

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Conversation

Anton-Kalpakchiev
Copy link
Collaborator

@Anton-Kalpakchiev Anton-Kalpakchiev commented Nov 5, 2024

As described in #371, all services should implement a "readiness" endpoint, which checks whether the service is ready to serve traffic, i.e. whether it can reach all of its dependencies. Thus, the origin and build index's readiness endpoints should check if they can reach remote backends. This diff adds a function to the backend manager that allows exactly that by iterating through the storage backends and running a Stat call on all of them.

I suggest it be configurable which backends need to be checked by the readiness endpoint (through the must_ready flag in the .yaml config), as some are more important for Kraken than others.

@Anton-Kalpakchiev Anton-Kalpakchiev marked this pull request as ready for review November 5, 2024 16:48
lib/backend/manager.go Show resolved Hide resolved
lib/backend/manager.go Outdated Show resolved Hide resolved
lib/backend/constants.go Outdated Show resolved Hide resolved
lib/backend/manager.go Outdated Show resolved Hide resolved
@Anton-Kalpakchiev Anton-Kalpakchiev merged commit 3749318 into master Nov 13, 2024
9 checks passed
@Anton-Kalpakchiev Anton-Kalpakchiev deleted the backend-is-ready branch November 13, 2024 10:36
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.

3 participants