Redis Open Source (redis)
In-memory data store for caches, sessions, queues and rate limits. Standalone, replicated, Sentinel or Redis Cluster.
Generated from catalog/services/redis.yaml: do not edit by hand.
Summary
| Version | 7.2.17 |
| Use | install and configure |
| Layer | infrastructure (shown apart) |
| Category | Data platforms |
| Installation methods | podman, package |
| External connection | redis |
| Sandbox only | no |
Licence
| SPDX identifier | BSD-3-Clause |
| Licence policy | licence exception |
| Licence exception | LEX-002 (pending, awaiting the client) |
| Licence note | Redis 7.2 is the last line under BSD-3-Clause: 7.4 moved to RSALv2 or SSPLv1 and Redis 8 adds AGPLv3. The platform stays on 7.2.x, unmodified, as a separate network service (ADR-0101; LEX-002 traces the licence and the version). |
| Platform component | redis |
Packages and artifacts
A package the project of the service publishes (its image, its binary archive, its Python or OS package) carries the licence of the service; a third-party package carries the licence written on its row, read from the official upstream metadata.
| Kind | Package | Version | Licence | Details |
|---|---|---|---|---|
| container image | docker.io/library/redis | 7.2.17 | BSD-3-Clause | image key redis, used by redis, sentinel, digest sha256:0312984fbfeb2ff1d4382ecef45b50e7d65478a6a58cf12ce28d6de7a4142e45 |
| OS package | redis | version of the configured repository | to confirm | RHEL family (dnf) |
| OS package | redis-server | version of the configured repository | to confirm | Debian family (apt) |
| OS package | redis-tools | version of the configured repository | to confirm | Debian family (apt) |
Images are pinned by tag in the descriptor, and by digest when the descriptor declares one (the offline bundle then refuses a pulled image that does not carry it); the digest is recorded in the mirror of the Manager when the offline bundle is imported, and every pull or load is checked against it.
Supported systems and architectures
| Method | Operating systems | Architectures |
|---|---|---|
podman | RHEL family (dnf), Debian family (apt), Arch Linux (pacman) | x86_64, aarch64 (not restricted by the descriptor) |
package | RHEL family (dnf), Debian family (apt) | x86_64, aarch64 (not restricted by the descriptor) |
Certified host systems: RHEL 8/9/10, Rocky Linux 8/9/10, AlmaLinux 8/9/10, Oracle Linux 8/9, CentOS Stream 9/10, Ubuntu 22.04/24.04, Debian 12, Arch Linux (rolling). The host preflight accepts these systems (other releases of a known family give a warning, end of life releases are refused) and the x86_64 and aarch64 architectures.
Prerequisites
Host
- at least 1024 MB of memory (blocking,
memory).
Network and ports
| Component | Port name | Port | Opened in the host firewall |
|---|---|---|---|
redis | redis | 6379/tcp | yes |
redis | bus | 16379/tcp | yes |
sentinel | sentinel | 26379/tcp | yes |
Kernel parameters
| Parameter | Value |
|---|---|
net.core.somaxconn | 1024 |
vm.overcommit_memory | 1 |
Services and connections needed
This service has no dependency.
Installation methods and modes
| Method | Default | What the method uses |
|---|---|---|
podman | yes | the container images of the descriptor, run by Podman under systemd |
package | - | the OS packages of the descriptor, installed by the package manager of the host |
Components
| Component | Kind | Installation methods | Ports |
|---|---|---|---|
Redis server (redis) | master | podman, package | 6379/tcp, 16379/tcp |
Redis Sentinel (sentinel) | master | podman, package | 26379/tcp |
Standalone (standalone) (default)
One Redis server.
What the mode deploys:
| Component | Placement |
|---|---|
redis | min 1, max 1 |
sentinel | not used |
Primary and replicas (replication)
The first host is the primary, every other host replicates it (any number of hosts from 2).
What the mode deploys:
| Component | Placement |
|---|---|
redis | min 2, recommended 3 |
sentinel | not used |
Sentinel (sentinel)
Primary and replicas watched by an odd number of Sentinels for automatic failover.
What the mode deploys:
| Component | Placement |
|---|---|
redis | min 2, recommended 3 |
sentinel | min 3, odd number, recommended 3 |
Redis Cluster, one replica (cluster)
Sharded cluster, one replica per primary (at least 6 nodes, even count).
What the mode deploys:
| Component | Placement |
|---|---|
redis | min 6, multiple of 2, recommended 6 |
sentinel | not used |
Redis Cluster, two replicas (cluster_ha)
Sharded cluster, two replicas per primary (at least 9 nodes, multiple of 3).
What the mode deploys:
| Component | Placement |
|---|---|
redis | min 9, multiple of 3, recommended 9 |
sentinel | not used |
Install this service
The install wizard of the Navin Manager plans, validates and runs the installation; you need the services:install permission on the cluster.
-
Open the wizard. In Clusters, choose the row action Install services of the target cluster. The wizard opens on its first step, Service.
-
Choose the service. On the Service step, select Redis Open Source. The card shows the licence
BSD-3-Clause. Pick the Method amongpodman,package(defaultpodman). To register an existingredisservice of your organisation instead, turn on Use an existing external service. -
Choose the hosts and the mode. On the Hosts step, tick the hosts, then choose the Mode:
standalone(default),replication,sentinel,cluster,cluster_ha. Each mode deploys the components listed in Installation methods and modes. With several components, place each one on its hosts in Component placement (Suggest placement proposes a placement that respects the cardinalities). -
Bindings. This service has no dependency: the Bindings step has nothing to bind.
-
Configure. On the Configure step, review the parameters (see Configuration parameters). Passwords left empty with a generated default are generated and sealed by the Manager.
-
Review and install. On the Install step the Manager validates the plan and shows the installation order; when it says "The plan is valid. Ready to install.", choose Install. A highly available mode is installed only when its HA checks pass.
-
Verify. The operation ends when the health checks of every instance pass (see Health checks); the service then shows as running in Services.
High availability
| Cluster | native (native) |
| High availability | native (native) |
| Failover | native (native) |
| Replication | native (native) |
| Quorum | Sentinel (sentinel) |
| Discovery | static (static) |
| Entry point | client discovery (client-discovery) |
| Official documentation | https://redis.io/docs/latest/operate/oss_and_stack/management/scaling/ |
| References | https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/ |
| Peer TLS parameter | tls_enabled |
| Cluster status command | cluster_info |
Topology per mode
| Modes | Highest catalog level | Distribution | Quorum component | Fault domains | Description |
|---|---|---|---|---|---|
standalone | standalone (standalone) | single (single) | - | 1 | One Redis server. |
replication | ha (ha) | active-passive (active-passive) | - | 2 | One primary and asynchronous replicas, without automatic failover. |
sentinel | ha (ha) | active-passive (active-passive) | sentinel | 3 | Primary and replicas watched by an odd number of Sentinels which promote a replica. |
cluster | cluster (cluster) | active-active (active-active) | - | 3 | Sharded cluster, one replica per primary; the primaries vote the failover. |
cluster_ha | cluster (cluster) | active-active (active-active) | - | 3 | Sharded cluster, two replicas per primary. |
Notes
- The replication mode has no automatic failover: use sentinel for it. Clients must support Sentinel or Redis Cluster; check it for every consumer before choosing the cluster mode.
Configuration parameters
Network
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|---|---|---|---|---|---|---|
Port (port) | port | 6379 | - | no | no | no | Client port (TLS port when TLS is on). |
Cluster bus port (cluster_bus_port) | port | 16379 | - | no | no | no | Port of the Redis Cluster bus between nodes. (cluster, cluster_ha) |
Memory
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|---|---|---|---|---|---|---|
Maximum memory (maxmemory_mb) | int | 1024 | min 64, MB | no | no | no | Memory limit of the data set, about half of the host memory. (recommended clamp(round(host.memory_mb * 0.5), 256, 65536)) |
Eviction policy (maxmemory_policy) | enum | allkeys-lru | noeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-lfu, volatile-ttl | no | no | no | What Redis evicts when the memory limit is reached. |
Persistence
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|---|---|---|---|---|---|---|
Append only file (appendonly) | bool | true | - | no | no | no | Log every write to the AOF for durability. |
Security
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|---|---|---|---|---|---|---|
Password (password) | password | generated | - | no | yes | no | Password of the default user, also used between replicas. |
TLS (tls_enabled) | bool | false | - | no | no | no | Serve clients and replication over TLS with the manager CA certificate. |
High availability
| Parameter | Type | Default | Allowed values | Required | Secret | Restart | Description |
|---|---|---|---|---|---|---|---|
Sentinel port (sentinel_port) | port | 26379 | - | no | no | no | Port of the Sentinel processes. |
Sentinel quorum (sentinel_quorum) | int | 2 | min 1 | no | no | no | Sentinels that must agree before a failover (majority). (recommended floor(len(topology.sentinel) / 2) + 1 if 'sentinel' in topology else 2) |
Primary name (master_name) | string | navin | ^[a-z][a-z0-9-]{0,40}$ | no | no | no | Name of the primary monitored by Sentinel. |
Endpoints
| Endpoint | Scheme | Component | Port | Path | TLS parameter | Binding parameters | Binding secrets | Provisioning command |
|---|---|---|---|---|---|---|---|---|
redis | redis | redis | 6379 (port) | - | tls_enabled | username, database, tls, mode, master_name, sentinels | password | - |
Client configuration files
Files rendered for the client configuration download:
redis.env(client.env.j2)
Commands
| Command | Component | Target | Description |
|---|---|---|---|
Server information (info) | redis | every host | Runs INFO on every Redis server (role, memory, replication). |
Replication status (replication_info) | redis | every host | Shows the replication role and the replicas of every server. |
Create the cluster (cluster_create) | redis | first host | Assigns the slots and the replicas over every node of the topology (once, Redis Cluster modes). (asks for confirmation) |
Cluster state (cluster_info) | redis | first host | Runs CLUSTER INFO and CLUSTER NODES. |
Health checks
Liveness (per instance)
| Component | Check | Details |
|---|---|---|
redis | TCP {{ host.ip or '127.0.0.1' }}:{{ config.port }} | 30 retries; interval 1 s; timeout 3 s |
sentinel | TCP {{ host.ip or '127.0.0.1' }}:{{ config.sentinel_port }} | - |
Readiness (service check)
| Check | Details |
|---|---|
TCP {{ host.ip or '127.0.0.1' }}:{{ config.port }} | - |
Preflight checks
| Check | Type | Meaning | Severity | Components |
|---|---|---|---|---|
memory | memory_mb {"min": 1024} | at least 1024 MB of memory | blocking | every component |
redis_port_free | port_free {"param": "port"} | port 6379 free on the host | blocking | redis |
Backup and restore
SAVE then copy of the RDB file of the first server (P5C-008, engine redis_rdb_backup). Modes standalone and replication; the cluster modes are refused by the backup script and Sentinel by the restore script, each with an explicit message.
| Format | redis-rdb |
| Component | redis |
| Files | {{ backup.dir }}/dump.rdb |
| Restore test | no |
| Instances stopped for the restore | yes |
Uninstall
Paths removed when the data is purged: {{ paths.data }}, {{ paths.log }}.
Upstream documentation
- Homepage: https://redis.io
- Source: https://github.com/redis/redis
- High availability: https://redis.io/docs/latest/operate/oss_and_stack/management/scaling/
- High availability: https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/