What is Valkey Sentinel?
Valkey Sentinel brings high availability to Valkey using the same battle-tested design as Redis Sentinel: sentinels watch the master and promote a replica automatically if it fails. This template runs one master, two replicas, and three sentinels (quorum 2). BSD-licensed and Redis-protocol compatible.
One image plays all three roles, selected by an environment variable; the entrypoint generates each command and the sentinel config from env, with hostname resolution so failover reports a DNS-resolvable address on a multi-pod network.
Clients connect through Sentinel - existing Redis Sentinel client libraries work unchanged, asking a sentinel for the current master and following failovers transparently.
What you get
- Automatic failover with replica promotion
- One master, two replicas, three sentinels (quorum 2)
- Hostname-based discovery for multi-pod networks
- Existing Redis Sentinel clients work unchanged
- All internal-only, password-protected
- BSD-3-Clause licensed
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
valkey-master | primary (:6379) | no (internal) |
valkey-replica-1/2 | replicas (failover targets) | no |
valkey-sentinel-1/2/3 | monitors + electors (:26379) | no |
Before you deploy
VALKEY_PASSWORDshared by master, replicas, and sentinel auth
Sizing and billing
Master and replicas hold the dataset in memory; sentinels are tiny. Six services, all internal. For sharding instead of failover, see valkey-cluster.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 14.65 GiB of volumes cost $0.15 per GiB a month ($2.20/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| AWS ElastiCache | Multi-AZ (2 nodes) | $24/mo | primary + replica on-demand/mo for the smallest size |
| Aiven | Caching Business | $80/mo | smallest HA managed Valkey plan/mo |
Managed HA caches bill per node; the whole Sentinel topology here is one stack, billed for the compute it reserves, BSD-licensed. Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
Sentinel or Cluster?
Sentinel gives failover HA for a dataset that fits on one node. valkey-cluster shards across multiple masters when one node is not enough. Many teams only need Sentinel.
Is it compatible with Redis Sentinel clients?
Yes. Valkey implements the same Sentinel protocol, so libraries written for Redis Sentinel connect to the valkey-sentinel-* nodes with master name "mymaster" unchanged.
What does this save vs managed HA caches?
Managed HA Redis/Valkey (ElastiCache Multi-AZ, Redis Cloud, Aiven) bills per node per month plus transfer. This runs the whole topology on your own infrastructure, on a flat resource or by the second on Usage Billing.