Valkey Sentinel
HA Cluster with Valkey Sentinel
a9s KeyValue uses Valkey Sentinel to provide a high available replication set. Valkey Sentinel is monitoring several nodes, takes care of the automatic failover and is able to send notifications when something in the cluster is changing.
a9s KeyValue provides some settings to adjust the cluster behavior: min-replicas-max-lag, min-replicas-to-write,
down-after-milliseconds, and failover-timeout.
| Setting | Effect |
|---|---|
min_replicas_max_lag | Time in seconds how long the primary waits before he stops accepting write operations, when replicas are no more reachable. Default is 10 seconds. It can be changed if enabled by the Platform Operator. See Custom Parameters.See valkey.conf |
min-replicas-to-write | The minimum number of connected replicas required for the primary to accept write operations. Default is 1. It can be changed if enabled by the Platform Operator. See Custom Parameters.See valkey.conf |
down-after-milliseconds | Number of milliseconds the primary is unreachable in order to mark it a S_DOWN state. Default is 10000 ms.See sentinel.conf |
failover-timeout | The failover timeout value in milliseconds. Default is 30000 ms.See sentinel.conf |
cf update-service my-keyvalue-service -c {"min_replicas_max_lag": "10"}
cf update-service my-keyvalue-service -c '{"down-after-milliseconds": "10000"}'
cf update-service my-keyvalue-service -c '{"failover-timeout": "30000"}'