envoyproxy/envoy

Add support of MYSQL health check

Open

#13,551 opened on Oct 13, 2020

View on GitHub
 (7 comments) (0 reactions) (0 assignees)C++ (5,373 forks)batch import
area/health_checkingarea/mysqlenhancementhelp wanted

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

Description

Title: Add MYSQL health check

Description: Currently, Envoy seems only support HTTP, TCP and REDIS (as an extension) type of health check when positively checking upstream endpoint's healthiness. In HAProxy, it has built-in mysql-check to perform a simple auth test or mysql handshake packet as the health check approach.

The advantages of having MYSQL health check is to better exclude replicas during DB failover and/or overloaded scenario. TCP health check will be passed as long as the port is opened by mysql, but it won't sufficient to rule out those unready or unhealthy replicas. Outlier ejection seems only work for HTTP traffic and cannot help so much under this case.

Actually, there are some work/proposals of supporting mysql relevant area in the community already, see below. I wonder whether it makes sense for community to consider adding MYSQL health check support as another extension. Hopefully, it is not very controversial.

Happy to discuss more.

[optional Relevant Links:] https://github.com/envoyproxy/envoy/issues/3501 https://github.com/envoyproxy/envoy/pull/3502 https://github.com/envoyproxy/envoy/pull/4975

Contributor guide