Customized readiness check API
We'd like to use spring boot built-in actuator health endpoint for the partition service health check API, and implement a customized health indicator.
Partition service implements the cache layer, different cloud provider's implementation implements the cache differently. It will be good to make sure the cache infrastructure and connection are ready before the pod serves the traffic.
To achieve this, the service will implement the custom health indicator, and get a dummy key from the cache instance. No matter it is memcache, redis, it expects no exception to claim the pod is ready to serve the traffic. This health check can be enabled or disabled by the configuration.