Skip to content

Commit b1e78a6

Browse files
authored
feat(batch-queue): two-level tenant dispatch for fair queue (#3133)
Replace flat master queue index with two-level tenant dispatch to fix noisy neighbor problem. When a tenant has many queues at capacity, the scheduler now iterates tenants (Level 1) not queues, then fetches per-tenant queues (Level 2) only for eligible tenants. Single-deploy migration: new enqueues write to dispatch indexes only, consumer drains old master queue alongside new dispatch path until empty.
1 parent 5612383 commit b1e78a6

File tree

11 files changed

+2034
-167
lines changed

11 files changed

+2034
-167
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
area: webapp
3+
type: feature
4+
---
5+
6+
Two-level tenant dispatch architecture for batch queue processing. Replaces the
7+
single master queue with a two-level index: a dispatch index (tenant → shard)
8+
and per-tenant queue indexes (tenant → queues). This enables O(1) tenant
9+
selection and fair scheduling across tenants regardless of queue count. Improves batch queue processing performance.

0 commit comments

Comments
 (0)