Gitpulse
LatestReleasesStand-up
Merged
Size
XL
Extra Large: 1000+ weighted lines
Change Breakdown
Feature75%
Performance25%
#3133feat(batch-queue): two-level tenant dispatch for fair queue

Batch queue scheduling restructured to isolate tenant workloads

Batch queue scheduling restructured to isolate tenant workloads
ER
ericallam
·Feb 26, 2026·#3133feat(batch-queue): two-level tenant dispatch for fair queue

A new two-level dispatch architecture guarantees fair queue processing, ensuring high-volume users can no longer stall operations for everyone else.

Batch processing capabilities are isolated per tenant to prevent the noisy neighbor problem. By segmenting queue backlogs per account, scheduling remains fair regardless of how many queues a specific high-volume user spins up. The upgrade moves the platform away from easily exhausted shared resources toward guaranteed operational throughput.

The system abandons a single, flat master queue in favor of a . Instead of evaluating thousands of individual queues across the platform, the first queries a list of active tenants, allocates processing time proportionately, and then pulls tasks from their specific queues.

When messages are enqueued or released, they register to a , which subsequently updates a shard-level tenant index via atomic . The deployment runs the legacy master queue in a drain-only state alongside the new routing logic until all older tasks are cleared.

View Original GitHub Description

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.

© 2026 · via Gitpulse