Unit 8 of 12 · about 4 hours · explain

Multi-tenant model and cache isolation, and prompt and trace privacy

Sharing one fleet across tenants without boundaries turns every burst into everyone's incident, and every shared cache into a privacy review.

You'll be able to

  • Explain the three noisy-neighbor channels (KV memory, network, time-sharing) and which quota stops each.
  • Choose quota, priority and bulkhead isolation per tier, and state what each costs.
  • Define the prompt, output and trace retention policy: what is logged, salted, billed and deleted.

Covers

Multi-tenant model and cache isolationPrompt, output and trace privacy
1

Read

In this order, only the parts listed

0 of 4 done

  1. Multi-tenancy and isolationMachine Learning Systems, Volume 2 - Inference at Scale and Serving Fault Tolerance

    Multi-Tenancy and Isolation: the noisy-neighbor Example 1.18 with Table 35 (all tenants violated at 22 to 45ms) versus quotas in Example 1.19 with Table 36 (only the burster throttled); Listing 1 quota admission (max_concurrent_requests, max_kv_cache_mb, max_qps, max_batch_tokens; its own check reads quota.max_concurrent, a mismatch to fix in your port); max-min fairness in token rate; Table 37 priority tiers; the bulkhead Figure 20 with Example 1.20; Listing 2 model-load eviction guard (page read 2026-10-14)

  2. Tenant-aware model selectionHands-On LLM Serving and Optimization - Chapters 3 and 4, serving system design

    Chapter 4, Implementing Model Selection (printed pp. 129-130): choose_endpoint with canary weight, tenant override route["tenants"][tenant]["url"], and 404 on unknown model

  3. vLLM prefix-cache saltvLLM Online Serving, Architecture and Production Metrics

    Chat and Completions extra parameters: cache_salt (up to 1024 characters) salting the prefix cache against prompt guessing in multi-user environments

  4. Security, compliance and data handlingInference Engineering - Chapter 7, Production

    Section 7.3.4 (printed p. 198): the three areas (user data, weights, infrastructure), the rule against storing inputs and outputs without a retention need, and data-residency routing; Section 7.4.3 (printed p. 203): server and audit logs as the observability record

2

Focus on

  • Bursts propagate through three channels at once: long sequences swell KV and evict others, large responses saturate egress, and time-sharing adds variance. One quota on request count stops none of them; quota KV megabytes, token rate and concurrency together.
  • Isolation is a ladder with explicit costs: quotas throttle the burster, priorities preempt for critical tiers, bulkheads dedicate replicas at idle cost. Soft quotas flex below 50% utilization and harden near 90%.
  • Shared prefix state is a cross-tenant channel. Salt the cache per tenant and scope affinity keys by tenant and version, or a timing probe guesses another tenant's prompt.
  • Retention is a design choice with a default of least data: log IDs, sizes, latencies and salted hashes for billing and debugging; keep raw prompts and outputs only with a declared need, owner and deletion path.
Common mistakes · 3
  • Treating equal request counts as fair shares. A long summarization tenant consumes the KV pool of many short-chat tenants; fairness is denominated in token-generation rate, not request count.
  • Sharing one prefix cache across tenants for hit rate. Hits across tenants leak prompt bytes through timing; salt per tenant and accept the lower shared hit rate.
  • Logging prompts to make debugging easy. The debug value is real and so is the breach surface; hash or drop raw text and keep the request ID as the join key.
3

Try it yourself

Closed-book, before checking anything

Closed-book, replay the two MLSys tables: ten tenants at 100 QPS each with one bursting to 500. Without quotas every tenant violates at 22 to 45ms; with quotas only the burster is throttled at 120 while the rest hold 10ms. Then list the four per-tenant observability dimensions.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.One tenant bursts 5x with no quotas. What happens to the other nine?Answer

    All violate: P99 climbs to 22 to 30ms against a 10ms contract while the burster itself hits 45ms. Shared pools propagate one burst to every tenant.

  2. 2.Same burst with quotas. Who sees what?Answer

    Only the burster is throttled (admitted at 120 with 50ms latency); the other nine hold 10ms. Quotas convert a fleet incident into one tenant's throttle.

  3. 3.Why is token-generation rate the fairness unit instead of request count?Answer

    KV bytes and decode steps scale with tokens, so equal counts let long requests starve short ones. Rate in tokens per second bounds throughput and memory together.

  4. 4.What are the four per-tenant observability dimensions?Answer

    Request volume with P50/P95/P99 latency, GPU and KV utilization, throttling and preemption counts, and errors by type. Without them a quota violation is invisible until it becomes an SLO breach.

You're done when

You can replay both burst tables from memory and defend your retention policy field by field: logged, salted, billed or deleted.

Only when you can do this without notes.

Leads to

Notes

Resources · 4 for this unit, 9 more in the section

Also in this section

  • vLLM Production MetricsvLLM Project · required

    Define every selected queue, cache, phase and request metric, check histogram buckets and measure exporter overhead. Add model version, cancellation, rejection, quality sample and tenant-safe trace fields in the surrounding service.

  • Gateway API Inference ExtensionKubernetes SIG Network · required

    Study model-aware routing, endpoint selection and operational integration. Use it for architecture and an optional local deployment only after the service passes lifecycle and failure tests without Kubernetes.

  • SGLang documentation - Production MetricsSGLang Project · support

    Compare its metric names and phase boundaries with vLLM's, so your dashboards do not depend on one engine's vocabulary.

  • AI Systems Performance Engineering - Production Inference LabsChris Fregly · required

    Use Chapter 16 monitoring, cache health, capacity planning and load-test utilities, then Chapter 17 routing only if distributed. Add process death, overload and bad-version cases that the performance pairs do not cover.

  • 100 Days of LLM Inference - Days 22 to 26Elizabeth Thomas · support

    Use the container, autoscaling, routing, capacity and zero-downtime notebooks as small operational simulations. Replace calendar order and fixed scale targets with the stage checkpoint and your hardware limits.

  • AI Infrastructure Engineer Learning - Project 103 LLM DeploymentAI Infra Curriculum · support

    Use its Docker, API, monitoring, Kubernetes and cost files as scaffolding only. Check its resource assumptions against your own model and GPU, and rerun any benchmark before reusing a result.

  • LLM Inference Systems Laboratory - Operations and FailureRoadmap-Final · support

    Complete production gateway, isolation, telemetry, canary, drain, rollback and fault campaigns. Store first-cause timelines and revise runbooks from observed blind spots.

  • OpenAI API Reference - streaming, auth, rate limits and request IDsOpenAI · reference

    Read the chat streaming event shape with the [DONE] terminator, bearer auth, rate-limit headers, and x-request-id with caller-supplied X-Client-Request-Id. vLLM is the implementation under test; use this only for the contract it claims compatibility with.

  • vLLM Multimodal Inputs - media validation, fetch policy and cache identityvLLM Project · reference

    Read Online Serving for image, video and audio inputs: --allowed-media-domains, fetch timeouts, --limit-mm-per-prompt, local-media path restriction, and media UUIDs for cache identity. The link is pinned to v0.31.0.