avito-tech / bioyino

High performance and high-precision multithreaded StatsD server
The Unlicense
228 stars 22 forks source link

Healthcheck for Bioyino #86

Closed syatihoko closed 2 months ago

syatihoko commented 4 months ago

Hello. Tell me please, is there any Healthcheck to understand whether the Bioyino cluster node is working? I want to use Keepalived or HaProxy for balancing. If not, I will listen to port 8136.

Albibek commented 4 months ago

You can use internal statistical metrics for this: they are collected by each node are added up to the other metrics. Not having them for any of the nodes in the final aggregation will mean the node is down or frozen. With this method you can leverage your existing monitoring system that watches all other metrics.

Another option, that fits keepalived/haproxy checks is to use management server's port to do this. You can either check if the port itself is open (TCP-level checks), send an HTTP request to a /status endpoint (HTTP-level checks). Though, since it's a management API that allows you to change cluster status, beware of this and make sure management API is only available to authorized clients.