AAI Agentic Handbook
Security & Tenancy

Noisy neighbour

Senior levelReviewed Oct 2026In 3 interview questionsIn 1 post

One tenant's heavy load (a bulk import, a runaway agent) degrading latency or quota for everyone sharing the same infrastructure.

In plain English

A noisy neighbour is a tenant whose heavy usage slows down everyone else on shared infrastructure. One customer starts a bulk import of 2 million documents or an agent stuck in a loop, and suddenly every other customer's searches are slow or their requests hit rate limits. The fix is to give each tenant fair limits and to keep any single tenant from consuming the whole shared pool.

Analogy

One flat in the building running every tap at once, so everyone else's shower drops to a trickle.

Common pitfall

Rate limiting only per user or per API key. One tenant with 500 users or 20 keys sails past every limit and still starves the shared provider quota.

How it actually works

LLM systems share several scarce pools: provider rate limits (tokens/minute per API key), GPU KV-cache and batch slots, vector-DB CPU, and ingestion workers. Protect each with per-tenant quotas (token buckets in the LLM gateway keyed by tenant), weighted fair queuing so a tenant with 10,000 queued jobs doesn't block one with 3, and separate pools for batch vs interactive. AWS's Builders' Library describes the approach: quota per tenant, admission control, and shuffle sharding, where each tenant is assigned a small random subset of workers so a bad tenant affects only tenants sharing that exact subset: with 8 workers and shards of 2 there are 28 combinations, so any one other tenant shares both workers with probability 1/28. Agents make neighbours noisier: a loop can burn hundreds of thousands of tokens in minutes, so cap per-run tokens and steps (Stop conditions & step budgets). Measure per-tenant consumption on every request so you can see who is noisy before you guess.

What I'd ship on day one

Per-tenant token buckets (tokens/min and requests/min) at the LLM gateway; separate queues and worker pools for batch/ingestion vs interactive; weighted fair queuing across tenants; per-run token and step caps for agents; shuffle sharding for stateful workers; per-tenant metrics on every request.

Worked example

A developer-docs SaaS shares one provider key (2M input tokens/minute) across 400 tenants. One tenant launches a CI job that calls the assistant on every pull request: 900 requests/minute at 8k tokens = 7.2M tokens/minute demanded. Without quotas, everyone gets 429s. With a per-tenant bucket of 150k tokens/minute (burst 300k) and a separate batch queue, the CI tenant is throttled to its quota and queued; other tenants' p95 stays at 2.8 s.

In the interview

I'd meter every request by tenant, enforce per-tenant token buckets at the gateway, separate batch from interactive pools, and use shuffle sharding where workers are stateful. Follow-up: 'what about your biggest customer who legitimately needs more?' A higher, contracted quota and possibly dedicated capacity, priced; fairness doesn't mean equal.

No quotas
100 % of shared token quota
Per-tenant buckets
100 % of shared token quota
CI-heavy tenantother 399 tenantsheadroom
Per-tenant quotas cap one tenant's share and leave headroom for everyone else.

Numbers worth knowing

Shuffle-shard overlap, 8 workers, shard size 2
1 in 28chance another given tenant shares both of your workers
Per-tenant quota
~5–10% of shared poolfor SMB tiers; contracted higher for enterprise
Runaway agent burn
100k+ tokens/mina looping agent with a 30k-token context calling every few seconds

How to decide

WhenDo this
Shared provider key across tenantsPer-tenant token buckets at the gateway.
Bulk ingestion and live queries share workersSeparate pools; batch gets leftovers.
One tenant regularly >20% of capacityDedicated pool or key, priced into their contract.
Agents run autonomouslyPer-run token, step and time caps.

Cost maths

Unmetered, the noisy tenant pays nothing extra while 399 tenants' requests fail. With metering: the CI tenant's 7.2M tokens/min × 60 min at $3/M = ~$1,300 per hour of demand. Quotas plus usage-based overage turn that into revenue or a conversation, instead of an outage.

Operating it

Time to scale up when…
  • Any tenant >20% of a shared pool
  • Provider 429s that correlate with one tenant's activity
  • Enterprise tenants with SLAs sharing pools with free-tier traffic
What to monitor
  • Top tenant's share of tokens/min: alert >20% for 10 min
  • Per-tenant 429 rate: alert when tenants other than the top one see >1%
  • Agent runs exceeding token cap: alert per occurrence for review

When it goes wrong

What users saw

Every tenant of an e-commerce catalog-enrichment product saw 429 errors for 50 minutes on a Monday morning.

How it was caught

Provider 429 rate went from 0 to 60%; per-tenant metrics (added afterwards) would have shown one tenant at 85% of tokens.

Root cause

A large merchant started a 400k-SKU re-enrichment through the interactive API path; rate limits existed only per API key, and the merchant used 12 keys.

Fix

Per-tenant quotas at the gateway, batch API path with its own queue, and per-tenant token dashboards.

Sources

  1. Fairness in multi-tenant systems — AWS Builders' Library, 2021blog
  2. Workload isolation using shuffle-sharding — AWS Builders' Library, 2019blog

Check yourself

Three questions. Every option is explained once you answer.

1ConceptWhy is rate limiting per API key not enough in a multi-tenant LLM system?
2ScenarioA tenant's bulk import shares workers with live queries, and live p95 doubles during imports. What do you change?
3CalculationShuffle sharding with 10 workers and a shard size of 2. What is the chance another tenant shares both your workers?