greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

Add healthy check for GreptimeDB

Open MichaelScofield opened this issue 2 years ago • 2 comments

What type of enhancement is this?

API improvement

What does the enhancement do?

It's important for cloud monitoring components to explicitly check the healthy of datanode and frontend service. We can add "/health" API endpoint for http server. Just return "200 OK" with an empty json payload "{}" is ok for the initial purpose.

Implementation challenges

No response

MichaelScofield avatar Nov 25 '22 03:11 MichaelScofield

Hello. I am glad to try this good first issue, please assign this to me. Should this API be under /v1

DiamondMofeng avatar Nov 26 '22 09:11 DiamondMofeng

Hello. I am glad to try this good first issue, please assign this to me. Should this API be under /v1

I guess so

dongxuwang avatar Nov 26 '22 10:11 dongxuwang

@DiamondMofeng Glad to have you involved! I think this healthy check endpoint does not necessarily be placed under "v1", just `/health" is fine, since it's not some interfaces we might change with versioning.

MichaelScofield avatar Nov 28 '22 02:11 MichaelScofield

@DiamondMofeng Glad to have you involved! I think this healthy check endpoint does not necessarily be placed under "v1", just `/health" is fine, since it's not some interfaces we might change with versioning.

Is it possible that different versions are deployed at separate boxes?

dongxuwang avatar Nov 30 '22 02:11 dongxuwang

@dongxuwang It's possible, and under this circumstance, it's more important we use "/health" instead of "/v1/health" (and include the versioning info in the returned responses maybe), otherwise we have to futher distinguish which box installed with what version, that only make things more complex.

MichaelScofield avatar Nov 30 '22 02:11 MichaelScofield