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

Enhance /api/status to return multiple status codes or more information #473

Closed
robotdan opened this issue Feb 11, 2020 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request feature
Milestone

Comments

@robotdan
Copy link
Member

robotdan commented Feb 11, 2020

Enhance /api/status to return multiple status codes or more information

Problem

Today the status endpoint returns 200 or 500 and if you use this endpoint as a health check for a LB or other node manager, the node may get killed prematurely.

A 500 generally indicates one of our metrics has exceeded a prescribed threshold, most commonly a db connection wait, or similar issue.

This can simply mean the box is under heavy load, and not necessarily that the box is sick.

Solution

Either provide some configuration as to what the status endpoint returns or reserve 500 for a more catastrophic error - and provide some varying degrees of status so it functions better as a health check for a LB or other node manager.

Alternatives/workarounds

If the /api/status endpoint is causing you trouble as a health check endpoint, you can also make an API call such as /api/login with a known user + password w/out an applicationId - as a health check.

Additional context

N/A

Related

#362

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@robotdan robotdan self-assigned this Feb 11, 2020
@robotdan robotdan added enhancement New feature or request feature labels Feb 11, 2020
@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Feb 11, 2020
@robotdan robotdan moved this from Backlog to On Deck in FusionAuth Issues Feb 11, 2020
@chrishare08
Copy link

An alternative would be to provide an alternative health check such as /healthz which only returns a 200. This way we can get a very quick response and save /api.status for when more detailed information is needed about the overall operational status, especially since the cost of running /api.status is not free.

@robotdan robotdan moved this from On Deck to In progress in FusionAuth Issues Aug 28, 2020
@robotdan robotdan added this to the 1.19.0 milestone Aug 28, 2020
@robotdan robotdan moved this from In progress to Done in FusionAuth Issues Sep 6, 2020
@robotdan robotdan closed this as completed Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
FusionAuth Issues
  
Delivered
Development

No branches or pull requests

2 participants