Maestro is a Kubernetes Redis controller for autoscaling a Redis cluster running inside of a Kubernetes cluster.
Before using Maestro, the following requirements need to be met:
- A running Kubernetes cluster
- A Kubernetes StatefulSet Redis cluster deployment with at least six nodes (three masters and three slaves replicating each master)
- The Kubernetes API running inside of the Kubernetes cluster, and resolvable by the environment variable
SKUBER_URLon the pod running the Maestro microservice
Maestro utilizes adenda/cornucopia to add and remove Redis nodes from the Redis cluster. It polls Redis cluster nodes individually to be able to detect when the average memory usage across all Redis nodes reaches a configurable scaling threshold. When such a threshold is reached and maintained for a configured period of time, Maestro triggers a scaling up or a scaling down of the Redis cluster.
||The name of the StatefulSet Kubernetes resource managing the Redis cluster|
Redis configuration settings
||Initial node-hostname from which the full cluster topology will be derived (default: localhost). It is recommended to use a Kubernetes Service resource that resolves to one of the Redis cluster pods.|
||Initial node-port from which the full cluster topology will be derived (default: 7000).|
||The maximum memory usage for Redis nodes before the scale-up threshold is reached, which is taken as the average across all Redis nodes.|
||The minimum memory usage for Redis nodes before the scale-down threshold is reached, which is taken as the average across all Redis nodes.|
||The number of consecutive memory samples that are counted while the sampled memory is above the maximum memory threshold after which a scale-up of the Redis cluster is initiated.|
||The number of consecutive memory samples that are counted while the sampled memory is below the minimum memory threshold after which a scale-down of the Redis cluster is initiated.|
||The sampling period for memory samples.|