mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-19 16:55:02 +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. |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| templates | ||
| test | ||
| AGENTS.md | ||
| BREAKING-CHANGES.md | ||
| eslint.config.mjs | ||
| nodemon.json | ||
| package.json | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| vitest.config.base.ts | ||
| vitest.config.integration.testcontainers.ts | ||
| vitest.config.integration.ts | ||
| vitest.config.migration.testcontainers.ts | ||
| vitest.config.migration.ts | ||
| vitest.config.ts | ||
| vitest.tsc-entity-transform.ts | ||
| vitest.workspace-externals.ts | ||