Skip to content

Conversation

@bilalebi
Copy link
Contributor

@bilalebi bilalebi commented Mar 6, 2025

I was working on this a while ago I didn't want it to go to wast

Description

This PR add an endpoint that can be used to check the health status of gRPC server
image

Knowledge Base

Official Docs of how it works: https://grpc.io/docs/guides/health-checking/

Example(s)

Request

http://0.0.0.0:8014/api/metadata/grpc_status

Response when it's UP (200)

{
  "status": 1,
  "code": "OK"
}

Response when it's DOWN (503)

{
  "status": 0,
  "code": "UNAVAILABLE"
}

Dependencies

This gRPC PR needs to be merged and deployed first: Ensembl/ensembl-metadata-api#127

@bilalebi bilalebi added to discuss THis needs to be discussed before merging not urgent Not urgent labels Mar 6, 2025
self.stub = stub_class(self.channel) # Assign stub only if reflection succeeds
logger.info("gRPC reflection loaded successfully.")
except grpc.RpcError as e:
logger.warning(f"Failed to connect to gRPC service at {self.grpc_server_address}. "

Choose a reason for hiding this comment

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

Warning level? (to discuss :-) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not urgent Not urgent to discuss THis needs to be discussed before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants