advanced27 min studyLesson 441 in Engineering

Tenant isolation: define the claim before choosing a control

Separate fairness, availability, confidentiality, and integrity, then state the identity, resource, and observation boundaries that each claim needs.

On this page

What you’ll understand

  • Define a tenant from authenticated authority rather than an untrusted label.
  • Distinguish resource sharing measurements from access-control evidence.
  • Calculate a fairness index while retaining its workload assumptions.

A shared inference platform can distribute CPU time evenly while leaking another customer’s prompts through a misconfigured object store. It can also keep those prompts private while one training job destroys everyone else’s latency. Calling both situations “isolated” hides different engineering obligations. Begin with a specific claim about a specific tenant identity, resource, and failure or attacker model. This lesson uses Kubernetes 1.34 terminology for administrative boundaries, but its resource accounting examples are hypothetical rather than measurements of a particular cluster.

Start with authority and assets

A tenant is an authority domain: a customer, research group, or organization with a defined set of identities and permitted operations. A request’s tenant label must come from authentication and a trusted mapping. Copying a caller-controlled header into an accounting key allows the caller to spend somebody else’s budget or choose a fresh identity for every request. Trace this mapping through the gateway, asynchronous queue, worker, storage operation, and audit record. Losing the identity at a background handoff breaks both authorization and attribution.

Write separate obligations for confidentiality, integrity, availability, and fairness. Confidentiality concerns forbidden observations; integrity concerns forbidden changes. Availability includes continued service and bounded recovery under stated loads and failures. Fairness compares allocations against an entitlement policy. None implies the others: an equal scheduler does not authorize object reads, and denying object reads does not keep an overloaded shared device responsive. Also identify trusted components. Sharing a kernel or cluster administrator means that those components remain within the trust assumptions, even when ordinary tenants have separate namespaces.

∑idi,r≤Crfor every resource r\sum_i d_{i,r}\le C_r\qquad\text{for every resource }r
This necessary feasibility test uses demands d and capacity C in matching units separately for each resource, such as CPU-seconds per second or bytes of resident memory. It assumes additive demand accounting; it neither schedules work nor proves security.↔ Scroll wide equations horizontally.

Measure the entitlement you actually promise

Two requests are comparable only after choosing a cost model. An embedding request and a long autoregressive generation may have different accelerator time, memory residence, and network traffic. Equal request counts can therefore allocate unequal physical work. Conversely, equal GPU time may violate a policy that intentionally gives a larger customer twice the entitlement. Normalize observed service by the agreed entitlement before applying an equality metric. Preserve the original units and observation interval so that an attractive score cannot conceal low total throughput.

Jain’s index summarizes equality among nonnegative allocations, excluding the all-zero case. Its scale invariance is useful but also a limitation: uniformly tiny allocations score as highly as uniformly large ones. A score does not indicate whether deadlines were met, whether capacity was left idle, or whether a forbidden read succeeded. For an AI service, publish the vector of useful throughput, deadline success, errors, and relevant resource use beside the fairness calculation. Treat the score as one projection of an explicit service contract.

J(x)=(∑i=1nxi)2n∑i=1nxi2,xi≥0,∑ixi>0J(x)=\frac{(\sum_{i=1}^{n}x_i)^2}{n\sum_{i=1}^{n}x_i^2},\qquad x_i\ge0,\quad\sum_i x_i>0
The dimensionless index compares n allocations measured in the same units or normalized by entitlements. It lies between 1/n and 1; equality at one says nothing about utilization, authorization, or workload equivalence.↔ Scroll wide equations horizontally.

Keep the resource vector and the threat model visible

A tenant may be inside its CPU budget and still saturate a shared memory controller, metadata server, or admission webhook. Draw a resource path for each important operation instead of placing one generic box around a pod. Mark where a control applies, who can modify it, and what happens when its supporting service fails. A namespace may organize those controls, but it is not evidence that every shared dependency has acquired an independent fault or confidentiality boundary. The claim must name the dependencies it leaves shared.

Use the vector lab to represent two normalized demand dimensions. Reset, explicitly set angle 45 degrees and magnitude 2, predict both components, then Play or Step. For a separate comparison Reset and explicitly set angle zero and magnitude 2 before predicting again. The components change while the magnitude stays fixed; a scalar demand total cannot describe every resource constraint. This geometric model does not allocate cluster capacity or test tenant authorization. Its purpose is to make the lost information in a one-number isolation claim visible.

Equal service is not a complete isolation result

Two equal-entitlement tenants execute equal-cost requests on a hypothetical 100-request-per-second service. Over the same interval they achieve 80 and 20 requests per second. Calculate Jain’s index and compare with an alternative allocation of 40 and 40.

  1. Use matching useful-throughput units and the same observation interval. The first allocation sums to 100 requests per second, and the sum of squared numerical rates is 80 squared plus 20 squared, or 6,800.

  2. The index is 10,000 divided by twice 6,800, which is 25/34 or approximately 0.7353. This describes equality under the equal-cost and equal-entitlement assumptions; changing either assumption changes what should be normalized.

  3. The alternative gives 6,400 divided by twice 3,200, or one. Its total useful throughput is only 80 requests per second, leaving 20 of the stated capacity unused. Neither calculation tests whether one tenant can read the other tenant’s prompts.

The result

The second allocation is more equal by this metric but less productive in aggregate. Report both facts and investigate authorization with a separate oracle.

Explore the model

Interactive lab

Interactive lab · vectors

One magnitude can hide different resource pressure

For each independent run use Reset → set BOTH angle and magnitude → predict → Play/Step. Compare (45°,2), giving approximately (1.414,1.414), with (0°,2), giving (2,0). Coordinates are normalized dimensions, not CPU and memory measurements.

One magnitude can hide different resource pressurePlayback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Current readings: x component: 1.393; y component: 0.975; Magnitude: 1.7. All parameters are adjustable with the labeled controls below.−7.46−3.7303.737.46−3.5−1.7501.753.5xyvvₓ = 1.39
Vectorx / y projectionsTrace marker
x component
1.393
y component
0.975
Magnitude
1.7
t = 0 s

Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forAn unchanged aggregate magnitude can mask a different bottleneck; this lab provides no isolation proof.

Check your understanding

Two tenants have identical useful throughput. Which additional observation directly challenges confidentiality?

Try it yourself

Two equal-entitlement tenants achieve 30 and 30 equal-cost requests per second on a service capable of 100. Calculate their fairness index and utilization. What identity evidence is needed before using these counters for tenant billing?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Compute equality and aggregate useful throughput separately, then follow the accounting key back to authentication.

Compare with the solution

Jain’s index is one because the two positive allocations are equal. Utilization by this useful-throughput definition is 60/100, or 60 percent. The high index does not establish adequate availability or utilization. Billing also needs a trusted mapping from authenticated principals to tenants and preservation of that identity across queued work and storage operations. A caller-supplied tenant string is insufficient even if every counter is arithmetically consistent.

Take it with you

  • Define separate access, performance, and failure claims.
  • Normalize comparable allocations before computing fairness.
  • Trace tenant identity and every shared resource along the work path.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.