Skip to content

Commit 54f7138

Browse files
Steffen911claude
andauthored
docs: add Redis Sentinel configuration documentation (#2270)
* docs: add Redis Sentinel configuration documentation Add comprehensive documentation for Redis Sentinel mode support introduced in PR #9851. Changes: - Add Redis Sentinel environment variables to configuration reference table - Add new "Redis Sentinel Mode" section to cache infrastructure docs - Include configuration examples for self-hosted and TLS setups - Document mutual exclusivity with cluster mode - Add best practices and warnings for production deployments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * chore: remove unused callouts --------- Co-authored-by: Claude <[email protected]>
1 parent 5fd47aa commit 54f7138

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

pages/self-hosting/configuration/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ Langfuse (self-hosted) has extensive configuration options via environment varia
2525
| `REDIS_CONNECTION_STRING` | Required | Connection string of your redis instance. Instead of `REDIS_CONNECTION_STRING`, you can also use `REDIS_HOST`, `REDIS_PORT`, `REDIS_USERNAME` and `REDIS_AUTH`. To configure TLS check the detailed [Cache Configuration Documentation](/self-hosting/deployment/infrastructure/cache#configuration). |
2626
| `REDIS_CLUSTER_ENABLED` | `false` | Set to `true` to enable Redis cluster mode. When enabled, you must also provide `REDIS_CLUSTER_NODES`. |
2727
| `REDIS_CLUSTER_NODES` | | Comma-separated list of Redis cluster nodes in the format `host:port`. Required when `REDIS_CLUSTER_ENABLED` is `true`. Example: `redis-node1:6379,redis-node2:6379,redis-node3:6379`. |
28+
| `REDIS_SENTINEL_ENABLED` | `false` | Set to `true` to enable Redis Sentinel mode. Cannot be enabled simultaneously with cluster mode. When enabled, you must also provide `REDIS_SENTINEL_NODES` and `REDIS_SENTINEL_MASTER_NAME`. |
29+
| `REDIS_SENTINEL_NODES` | | Comma-separated list of Redis Sentinel nodes in the format `host:port`. Required when `REDIS_SENTINEL_ENABLED` is `true`. Example: `sentinel1:26379,sentinel2:26379,sentinel3:26379`. |
30+
| `REDIS_SENTINEL_MASTER_NAME` | | Name of the Redis Sentinel master. Required when `REDIS_SENTINEL_ENABLED` is `true`. This must match the master name configured in your Sentinel setup. |
31+
| `REDIS_SENTINEL_USERNAME` | | Username for Redis Sentinel authentication (optional). Used when Sentinels require authentication. |
32+
| `REDIS_SENTINEL_PASSWORD` | | Password for Redis Sentinel authentication (optional). Used when Sentinels require authentication. |
2833
| `REDIS_AUTH` | | Authentication string for the Redis instance or cluster. |
2934
| `NEXTAUTH_URL` | Required | URL of your Langfuse web deployment, e.g. `https://yourdomain.com` or `http://localhost:3000`. Required for successful authentication via OAUTH and sending valid Links via Slack integration. |
3035
| `NEXTAUTH_SECRET` | Required | Used to validate login session cookies, generate secret with at least 256 entropy using `openssl rand -base64 32`. |

pages/self-hosting/deployment/infrastructure/cache.mdx

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,14 @@ OR
5353
| `REDIS_TLS_CA_PATH` | | Path to the CA certificate for the Redis connection. |
5454
| `REDIS_TLS_CERT_PATH` | | Path to the certificate for the Redis connection. |
5555
| `REDIS_TLS_KEY_PATH` | | Path to the private key for the Redis connection. |
56-
| `REDIS_KEY_PREFIX` | `` | Optional prefix for all Redis keys to avoid key collisions with other applications. Should end with `:`. |
57-
| `REDIS_CLUSTER_ENABLED` | `false` | Set to `true` to enable Redis cluster mode. When enabled, you must also provide `REDIS_CLUSTER_NODES`. |
58-
| `REDIS_CLUSTER_NODES` | | Comma-separated list of Redis cluster nodes in the format `host:port`. Required when `REDIS_CLUSTER_ENABLED` is `true`. |
56+
| `REDIS_KEY_PREFIX` | `` | Optional prefix for all Redis keys to avoid key collisions with other applications. Should end with `:`. |
57+
| `REDIS_CLUSTER_ENABLED` | `false` | Set to `true` to enable Redis cluster mode. When enabled, you must also provide `REDIS_CLUSTER_NODES`. |
58+
| `REDIS_CLUSTER_NODES` | | Comma-separated list of Redis cluster nodes in the format `host:port`. Required when `REDIS_CLUSTER_ENABLED` is `true`. |
59+
| `REDIS_SENTINEL_ENABLED` | `false` | Set to `true` to enable Redis Sentinel mode. Cannot be enabled simultaneously with cluster mode. |
60+
| `REDIS_SENTINEL_NODES` | | Comma-separated list of Redis Sentinel nodes in the format `host:port`. Required when `REDIS_SENTINEL_ENABLED` is `true`. |
61+
| `REDIS_SENTINEL_MASTER_NAME` | | Name of the Redis Sentinel master. Required when `REDIS_SENTINEL_ENABLED` is `true`. |
62+
| `REDIS_SENTINEL_USERNAME` | | Username for Redis Sentinel authentication (optional). |
63+
| `REDIS_SENTINEL_PASSWORD` | | Password for Redis Sentinel authentication (optional). |
5964

6065
## Deployment Options
6166

@@ -191,6 +196,46 @@ When using Redis cluster mode:
191196

192197
</Callout>
193198

199+
## Redis Sentinel Mode
200+
201+
Redis Sentinel provides high availability for Redis deployments without the complexity of full cluster mode.
202+
It automatically monitors Redis master and replica instances, handles failover, and provides service discovery.
203+
This makes it ideal for deployments that need automatic failover but don't require horizontal scaling across multiple shards.
204+
205+
### Configuration
206+
207+
To enable Redis Sentinel mode, set the following environment variables:
208+
209+
```bash
210+
REDIS_SENTINEL_ENABLED=true
211+
REDIS_SENTINEL_NODES=sentinel1:26379,sentinel2:26379,sentinel3:26379
212+
REDIS_SENTINEL_MASTER_NAME=mymaster
213+
REDIS_AUTH=your-redis-password # if authentication is enabled on Redis
214+
REDIS_SENTINEL_PASSWORD=your-sentinel-password # if authentication is enabled on Sentinels (optional)
215+
```
216+
217+
### Example Configurations
218+
219+
#### Self-hosted Redis with Sentinel
220+
221+
```bash
222+
REDIS_SENTINEL_ENABLED=true
223+
REDIS_SENTINEL_NODES=10.0.1.10:26379,10.0.1.11:26379,10.0.1.12:26379
224+
REDIS_SENTINEL_MASTER_NAME=langfuse-master
225+
REDIS_AUTH=your-redis-password
226+
```
227+
228+
<Callout type="warning">
229+
230+
When using Redis Sentinel mode:
231+
232+
- Ensure all Sentinel nodes are accessible from your Langfuse containers
233+
- The `REDIS_SENTINEL_MASTER_NAME` must match the master name configured in your Sentinel setup
234+
- Set `maxmemory-policy=noeviction` on the Redis master and replicas to prevent queue job eviction
235+
- TLS configuration (if enabled) applies to connections to both Sentinels and Redis instances
236+
237+
</Callout>
238+
194239
## Sizing Recommendations
195240

196241
Langfuse uses Redis mainly for queuing event metadata that should be processed by the worker.

0 commit comments

Comments
 (0)