Durable dashboard session store
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 149
Description
# F3.2 — Durable dashboard session store (nr-launcher)
⚠️ Needs #8280 aka F3.1 first.
## Context
When a dashboard uses FlowFuse User auth, the "this user is logged in" record is kept in an in-process `MemoryStore` inside the instance's Node-RED process. That has two consequences:
- **Restart:** the process dies on any restart/redeploy/suspend-resume → the store is wiped → every viewer is logged out at once (a team-wide re-auth/Forbidden wave).
- **HA:** each replica has its own store → a session on one pod is invisible to the others, so viewers keep re-authing.
F3.1 aka #8280 fixed the *cookie* surviving a restart; F3.2 is the other half — making the session *data* durable so the cookie actually has something to resolve to. Both are needed before "sessions survive a restart" is true.
**Fixes for users:** dashboard sessions survive an instance restart/redeploy and work across HA replicas. This is the actual F3 payoff.
## Options
| Option | What | Effort | Risk | Covers |
|---|---|---|---|---|
| **D. Forge-backed HTTP store** | custom store → new forge endpoint | Med–High | Med — new endpoint, but matches how the launcher already persists everything (HTTP-to-forge), **no infra** | Restart + HA |
| A. File store on PVC | `session-file-store` on the existing `/data/storage` RWX volume | Med | Med — gated on `persistentStorage` (**default off**); file-locking on shared FS | Restart + HA (only when enabled) |
| B. Redis/Valkey | shared store | High | High — instances can't reach Redis today; needs new infra + dep + failure mode | Restart + HA |
| C. Ingress cookie affinity | sticky routing, no store change | Med | Med — infra, ingress-specific | HA only (**not** restart) |
**Lean:** D — it fits how the launcher already works (everything persists over HTTP to forge), needs no new infrastructure, and solves both restart and HA. A is the cheaper shortcut *if* `persistentStorage` is already on for the affected instances. Avoid B (infra cost) and C (doesn't fix restart).
Contributor guide
Research direction
Start in nr-launcher at the dashboard's in-process MemoryStore and trace how session reads and writes reach the Node-RED process. Review prerequisite issue #8280 and the existing forge HTTP persistence path; the preferred direction is a forge-backed HTTP store. Done means sessions survive restart or redeploy and resolve consistently across HA replicas, with coverage for both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100