Skip to content

feat: Readiness endpoint#2188

Draft
sergerad wants to merge 5 commits into
nextfrom
sergerad-readiness-endpoint
Draft

feat: Readiness endpoint#2188
sergerad wants to merge 5 commits into
nextfrom
sergerad-readiness-endpoint

Conversation

@sergerad
Copy link
Copy Markdown
Collaborator

@sergerad sergerad commented Jun 3, 2026

Relates to #2176.

WIP.

Creates a new endpoint for loadbalancers to get gRPC 0 or 14 status codes from.

@sergerad sergerad changed the title Readiness endpoint feat: Readiness endpoint Jun 3, 2026
Comment thread proto/proto/rpc.proto
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Something that bothers me here though, is that the load-balancer must also serve this endpoint 🤔

But I suppose that they would just forward it, and if anything is available it returns Ok, and if nothing is available they wouldn't have a service. So maybe it just works :)

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

After some digging, it looks like gRPC has its own health check service defined. We should probably consider that instead since it probably is supported by load-balancers out the box (..maybe).

https://github.com/grpc/grpc/blob/master/doc/health-checking.md

@sergerad
Copy link
Copy Markdown
Collaborator Author

sergerad commented Jun 3, 2026

After some digging, it looks like gRPC has its own health check service defined. We should probably consider that instead since it probably is supported by load-balancers out the box (..maybe).

https://github.com/grpc/grpc/blob/master/doc/health-checking.md

I think this approach adds some complexity that we would never leverage (service name, additional status codes). Happy to do it if we think we will use it. But if not, prefer to keep simple with just 0 and 14 codes and no service names.

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

Mirko-von-Leipzig commented Jun 4, 2026

I think this approach adds some complexity that we would never leverage (service name, additional status codes). Happy to do it if we think we will use it. But if not, prefer to keep simple with just 0 and 14 codes and no service names.

The way I understand it, its still just the same except we return an enum instead of the status code.

And since each server effectively only has a single gRPC service (+ health service I guess), we only need to support the empty, health (always returns healthy), and the specific gRPC service the server implements? If we do this only for nodes then its always:

"" - overall server health
"rpc.Api"
"Health"

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