Part 5 of 12 · 2 min read
Noisy neighbours: isolation is also performance
One tenant's heavy use can starve another's, even with no data ever crossing between them.
Think of a shared office kitchen with one kettle. If one team boils it constantly for a big meeting, everyone else waits. Nobody's lunch got mixed up with anyone else's.
In plain words: tenants sharing compute, tokens or queue capacity can degrade each other's performance without any data ever leaking, which is why isolation has to cover speed as well as privacy.
A worked example. Against a shared budget of 100 tokens per second, tenant A floods the system at 400 tokens per second while tenant B asks for its normal 10. Split proportionally to demand, B gets served only 24 percent of what it asked for. Giving each tenant its own quota, here each capped at half the shared budget regardless of what the other is doing, raises B's served share to 100 percent. Neither tenant's access to data changes at all.
The key lines.
# from code/mini-tenancy/tenancy.py
if per_tenant_quota:
cap = {t: min(d, global_tps // 2) for t, d in demand.items()} # each tenant limited to half the budget
got = {t: min(cap[t], left) for t in demand}
else:
total = sum(demand.values()); got = {t: min(demand[t], global_tps * demand[t] / total) for t in demand}
Read it as: without a quota, the budget is split in proportion to how much each tenant is asking for, which rewards the loudest tenant. With a quota, each tenant has a ceiling that the other tenant's demand cannot push past.
Tenant, multi-tenancy, isolation, noisy neighbour
A tenant is one customer organization sharing a system with others (multi-tenancy). Isolation means tenants cannot see or affect each other's data or performance. A noisy neighbour is a tenant whose heavy use degrades others' performance alone.
Example: tenant A's flood above dropping B to 24 percent served — a noisy-neighbour effect with zero data crossing between A and B.