You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0d48835
Browse filesBrowse the repository at this point in the historyBrowse files
| CLI pairing-code approval store | API-key login through pairing; OAuth login uses a separate path |
25
+
| OAuth flow state | Short-lived state for in-progress OAuth, MCP OAuth, and Slack OAuth connections |
26
+
| Pending webhook verifications | Challenge state while a provider verifies a newly registered webhook |
27
+
| Distributed locks | Leases that keep a job, schedule, or stream on one replica at a time |
25
28
| Collaborative document store (realtime) | Shared state for collaboratively edited documents |
26
29
27
30
<Callouttype="error">
28
31
The app checks `REDIS_URL` when it starts and refuses to boot when it is missing or is not a `redis://` or `rediss://` URL. `next build` does not need Redis, so an image builds without it; the running server does not.
29
32
</Callout>
30
33
31
-
Everything Sim keeps in Redis is cache, coordination state, or an in-flight event — never committed data, which lives in PostgreSQL and object storage. Persistence is therefore not required. Losing or restarting the instance is not free, though: cancellation markers and the cross-pod half of execution streaming live here, so active runs stop streaming and a cancellation issued across the gap may not land. Completed work is unaffected.
34
+
Everything Sim keeps in Redis is cache, coordination state, or an in-flight event — never committed data, which lives in PostgreSQL and object storage. Persistence is therefore not required. Losing or restarting the instance is not free, though:
35
+
36
+
- Active runs stop streaming, and a cancellation issued across the gap may not land, because cancellation markers and the cross-pod half of execution streaming live here.
37
+
- Pending email OTPs stop working and must be requested again.
38
+
- OAuth, MCP OAuth, and Slack OAuth connections in progress fail and must be started again.
39
+
- Pending webhook verifications are lost.
40
+
- Rate-limit buckets reset.
41
+
42
+
Completed work is unaffected.
43
+
44
+
### Eviction policy
45
+
46
+
Use `maxmemory-policy noeviction`, as the bundled Helm Redis does, and size the instance so it never fills. Alert on memory use well before the limit: with `noeviction`, a full Redis rejects writes instead of silently dropping keys.
47
+
48
+
Most managed services default to an evicting policy such as `volatile-lru` or `allkeys-lru`. Under memory pressure, `volatile-*` policies evict only keys with a TTL and `allkeys-*` policies evict any key. Either way, the short-lived keys Sim depends on are at risk: OTPs, OAuth state, locks, and rate-limit buckets. An evicted key looks like an expired code, a failed OAuth connection, a duplicated job, or a reset limit. Change the policy in the service's parameter group or configuration.
32
49
33
50
## Configuration
34
51
@@ -45,14 +62,24 @@ Both the app and the realtime service need it and must point at the same instanc
45
62
46
63
`docker-compose.prod.yml` already includes a `redis:7-alpine` service and wires `REDIS_URL=redis://redis:6379` into both the app and realtime containers. No additional Redis URL is needed for that bundled instance.
47
64
65
+
That service sets no `maxmemory`, so Redis can grow until the host runs out of memory. Watch its memory use on a long-running host.
66
+
48
67
The port is deliberately not published to the host, so a Redis already running locally will not collide. Override `REDIS_URL` in `.env` to point at an external instance instead.
49
68
50
69
</Tab>
51
70
<Tabvalue="Kubernetes (Helm)">
52
71
53
72
The chart deploys Redis by default, matching the Compose stack. No additional Redis URL is needed for that bundled instance.
54
73
55
-
For production, prefer a managed instance — disable the bundled one and supply a URL. With `redis.enabled: false`, the chart refuses to render unless `REDIS_URL` comes from `app.env`, a pre-created `app.secrets.existingSecret`, or `externalSecrets.remoteRefs.app.REDIS_URL`:
74
+
For production, prefer a managed instance — disable the bundled one and supply a URL. With `redis.enabled: false`, the chart refuses to render unless `REDIS_URL` reaches every enabled app and realtime pod. Accepted sources:
75
+
76
+
-`app.env.REDIS_URL` or `realtime.env.REDIS_URL`, written into the app Secret that both pods load
77
+
- A top-level `extraEnvVars` entry named `REDIS_URL`, such as one with `valueFrom.secretKeyRef`, which is set on both pods
78
+
- A pre-created `app.secrets.existingSecret`, which the chart trusts because it cannot read it
79
+
-`externalSecrets.remoteRefs.app.REDIS_URL` when External Secrets is enabled
80
+
-`app.envDefaults.REDIS_URL` covers only the app pod, and `realtime.envDefaults.REDIS_URL` only the realtime pod, so set both when both are enabled
0 commit comments