tbmq icon indicating copy to clipboard operation
tbmq copied to clipboard

[Feature Request] What do use as Docker HEALTHCHECK

Open apachler opened this issue 1 year ago • 3 comments

Component

  • TBMQ Docker

Description

Since many supporting tools (curl, nc, wget, ..) are missing in the container image i have no idea how to implement a useful healthcheck. Also, is there an application endpoint where some can do a solid healthcheck with? Because, checking for the running process is not suitable and does not give any hint if the application itself is working as expected.

Environment

  • OS: SLES 15, Docker Swarm
  • TBMQ: 1.4.0

apachler avatar Dec 03 '24 08:12 apachler

hi @apachler,

Thank you for your feedback. Unfortunately, at the moment, there is no dedicated health endpoint in TBMQ that provides a comprehensive state check for the entire broker, including dependencies like Redis, Kafka, and PostgreSQL. We understand that merely checking if the process is running does not provide meaningful insights into the broker's actual health.

We acknowledge the importance of such functionality and are committed to adding a robust health endpoint in future releases. This endpoint will include checks for critical dependencies and core MQTT operations to ensure the broker is functioning as expected.

Thank you for bringing this to our attention, and we appreciate your patience as we work on this improvement.

dmytro-landiak avatar Dec 03 '24 09:12 dmytro-landiak

I am not sure if it is required to have an health endpoint that checks the dependencies also because those are already health checked by itself. The container should not restart because of a dependency not working but it should restart if the application in the container itself is stale. So i think the health endpoint should just report if the application itself is available or not...

apachler avatar Dec 03 '24 09:12 apachler

We will carefully review this aspect before proceeding with implementation. However, we believe there could be cases where dependencies like Redis or PostgreSQL are healthy, but the connection between TBMQ and these services is broken and cannot be fixed automatically.

In such scenarios, the broker's functionality could be impacted, even though the underlying dependency is operational. This is something we need to account for in the health endpoint to ensure it reflects the true state of the application.

dmytro-landiak avatar Dec 03 '24 10:12 dmytro-landiak