mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-21 20:20:03 +02:00
Ports the multi-tenant containment from #30294: - GET /workflows/search-nodes is rate limited per user (120/min); the client debounces its keystrokes, which no human can sustain past this ceiling. - The service runs at most one scan per process (pLimit(1)) with a short queue of 4, shedding excess with 429. A per-user rate limit cannot bound load on a shared database: #30294 measured 66x (SQLite) / 56x (Postgres) workflow-list degradation from 20 users each inside their own limit; capped at one concurrent scan the same scenario measured ~1.3x. In multi-main setups the ceiling is per instance, which is the intent: it bounds what a single process can demand of the shared DB. The command-bar composable already treats a failed request as empty results, so a shed search degrades gracefully client-side. Verified: service unit 19/19, integration 23/23 (new shed test) on both SQLite and Postgres 16; controller unit 11/11; typecheck + lint clean. |
||
|---|---|---|
| .. | ||
| integration | ||
| migration | ||
| shared | ||
| unit | ||
| extend-expect.ts | ||
| global-setup.ts | ||
| setup-mocks.ts | ||
| setup-test-folder.ts | ||
| setup-testcontainers.ts | ||