karapace icon indicating copy to clipboard operation
karapace copied to clipboard

Implement endpoint for health check

Open hackaugusto opened this issue 3 years ago • 2 comments

Bugs in dependency libraries can cause the karapace APIs to become unresponsive, restarting the process is usually a valid and quick fix for the problem. To properly implement the restart a /status endpoint is necessary, this endpoint has to peform some request through the kafka client to make sure communication is working properly.

hackaugusto avatar Jan 13 '21 21:01 hackaugusto

I have used the /brokers endpoint for this. I haven't looked in detail at what it does, but hope it will catch most situations.

mortenlj avatar Apr 27 '21 18:04 mortenlj

/brokers is a good idea, and it will cover the Admin client used in the REST APIs. But we need to do some additional work to also include the schema registry APIs, the motivation behind this issue was two bugs we found, that caused the API to become unresponsive (https://github.com/dpkp/kafka-python/pull/2189 and https://github.com/dpkp/kafka-python/pull/2194). To figure out if the clients are not stuck in a infinite loop we have to use each one of them individually.

hackaugusto avatar Apr 27 '21 18:04 hackaugusto