[Design Review]: Server-side Multi-Workspace Phase 1
Author: danielaskddCreated Aug 11, 2026Updated Sep 28, 2026
Labelsenhancementuiserverbackenddiscusstracked
Summary
This issue is the review and discussion entry point for the proposed Phase 1 server-side multi-workspace design:
- Design document: LR2-multi-workspace-phase1.md
- Status: Design draft; maintainer decisions have been incorporated, but implementation has not started.
The document consolidates and refines the earlier discussions in #3511, #3563, #2527, and the review of #3397 into an implementation-oriented contract and a nine-PR delivery plan.
Proposed Phase 1 contract
- Workspaces must be explicitly created; data-plane selectors never auto-create them.
- Each workspace has an immutable, portable
ws_ID, while its display name and Ollama tag remain editable. - A durable
WS_CATALOGis the control-plane source of truth. - Each live
LightRAGinstance is permanently bound to one workspace ID and is managed by a bounded per-worker pool with leases and safe eviction rules. - KV, vector, graph, doc-status, pipeline state, input directories, and query-answer caches are isolated by workspace.
- LLM/VLM/embedding/rerank concurrency remains a server-wide budget. Ingestion caches may be shared only where the cache key is content-derived and workspace-independent.
- Legacy single-workspace deployments upgrade without moving or re-embedding data. Backend-specific
*_WORKSPACEoverrides are rejected where they could collapse isolation. - Migrations remain control-plane operations; unknown workspace IDs return 404 without creating storage or instantiating a workspace.
- Authorization is composed in two stages: the policy file grants actions, while the workspace catalog grants membership.
- Same-host multi-worker deployments are in scope. Multi-tenant semantics, multi-node coordination, per-workspace storage profiles, and physical isolation are deferred.
Review requested
Please review the full document, especially these cross-cutting contracts:
- Identity and compatibility: workspace ID format, reserved identifiers, legacy bootstrap, and the effective-workspace consistency checks across all storage families.
- Catalog and lifecycle: the new
WS_CATALOGabstraction, JSON/PostgreSQL behavior, creation gates, deletion semantics, snapshot refresh, and migration ownership. - Isolation: doc-status and pipeline separation, per-workspace input paths and defaults, and the split between shared ingestion cache and isolated answer cache.
- Resource safety: instance leases, eviction eligibility, pool capacity/backpressure, and server-wide provider concurrency in both uvicorn and Gunicorn modes.
- API and authorization:
LIGHTRAG-WORKSPACErouting, status-code semantics,/healthversus/status, Ollama tag routing, workspace membership, and management permissions. - Delivery plan: ordering and rollback safety of PR1–PR9, particularly the requirement to land cache separation before exposing a second workspace and to delay write routing until doc-status/pipeline isolation is complete.
Questions for consensus
- Are any stated invariants insufficient to prevent cross-workspace reads, writes, queue corruption, cache leakage, or destructive-operation leakage?
- Are the legacy upgrade and rollback guarantees complete for the supported storage backends?
- Is the proposed PR split reviewable and safe, or should any dependency move earlier or later?
- Are any accepted Phase 1 limitations blockers rather than documented follow-up work?
- After resolving review feedback, can this document serve as the implementation baseline for Phase 1?
Please keep implementation-specific follow-ups tied to the relevant section or planned PR so the final decisions can be reflected back into the design document.
Source: HKUDS/LightRAG