WL#11890: REST endpoint for health of routes

Affects: Server-8.0   —   Status: Complete

Motivation

Load Balancer, containers, ... have a notion of liveness (process is alive) and readiness (can provide its service) to only expose the service if it is really ready.

In the case of MySQL Router there are three states:

  1. process is alive
  2. socket is open can receive packets
  3. backends are healthy and ready to receive connections

"process is alive" (e.g. kill()) and "socket accepts connections" (connect()) are externally checkable, the information if router knows the backends are healthy is only known to the router itself.

Goal

Solution should work with containers, cloud providers and load-balancers like

Allow to

  • query via a GET request if router has backends available and that group replication nodes are ready to accept connections.

Design Requirement

DR1
MUST work with static routing
DR2
MUST work with innodb-cluster metadata-cache