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

[Requested feature] Create a health check endpoint for the server #65

Open
M-casado opened this issue May 24, 2023 · 0 comments
Open

[Requested feature] Create a health check endpoint for the server #65

M-casado opened this issue May 24, 2023 · 0 comments

Comments

@M-casado
Copy link
Contributor

Summary

Creation of a "Health Check" Endpoint for Biovalidator Server, to be used to determine the operational status and health of a system or service.

Motivation

The addition of a "Health Check" endpoint for the Biovalidator server would provide a convenient way to determine the server's operational status. This feature aims to simplify the process of checking whether the server is up and running or if it has encountered any issues.

Details

The "Health Check" endpoint would be a new API endpoint that can be accessed to verify the status of the Biovalidator server. The endpoint should return a response indicating whether the server is functioning correctly or if it is experiencing any errors or downtime.

When the endpoint is accessed, it should perform a quick internal check to ensure that all necessary services and components of the Biovalidator server are operational. This check should cover critical aspects, for example: checking that other endpoints are accessible, that external service dependencies are accessible, and overall server availability.

The response from the "Health Check" endpoint should include relevant information about the server's status, such as a timestamp of the last check, the server's uptime duration, amount of validation requests since deployment and any specific error messages or warnings if applicable.

Use cases

The "Health Check" endpoint would be beneficial for the following use cases:

  • Monitoring the Biovalidator server's availability and ensuring it is functioning properly.
  • Alerting administrators or system operators if the server is down or experiencing issues.
  • Integrating the "Health Check" functionality into existing monitoring systems or dashboards.
  • Automating regular checks of the server's health and receiving notifications based on the results.
  • Obtaining information about the current deployment of the server.

Example

To perform a "Health Check" on the Biovalidator server, a GET request would be made to the following mocking endpoint:

GET http://localhost:3020/healthcheck

The response from the server would provide information about the server's current status. A successful response would have a status code of 200 and a JSON payload similar to the following:

{
  "status": "ok",
  "timestamp": "2023-05-24T12:00:00Z",
  "uptime": "2 days 3 hours 30 minutes",
  "requestsNumber": 1930,
  "message": "Server is running smoothly.",
  "externalDependencies": [
        "identifiers.org": { ... },
        "ontologyLookupService": { ... },
        "europeanNucleotideArchive": { ... }
   ]
}

In case of an error or server unavailability, the response would have a status code indicating the issue and an accompanying error message.

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

No branches or pull requests

1 participant