The interview problem

Practice prompt

A service hosts hundreds of customer adapters on one base model family. Design routing and adapter caching so a cold adapter does not stall every tenant or contaminate another tenant’s output.

Original practice, not a reported company interview. All worked numbers are illustrative. Interview date: not applicable. Written October 3, 2026.

1. Scope and assumptions

Assume adapters are validated before registration and use a supported base-model version. Treat adapter loading as a privileged operation. Serving capacity depends on adapter memory, rank and batching support, not just base weights.

2. Architecture and decisions

Authorized adapter ID → immutable registry → warm/cold queue → compatible worker → pinned adapter execution

Use tenant-scoped adapter IDs mapped to immutable digests, base-model identities and rank limits. The request gateway checks access before scheduling. Workers verify artifacts, load into a bounded cache and pin an adapter while requests use it. Keep cold loads in a separate queue with admission limits so a burst of distinct adapters cannot evict the whole working set.

Route to warm workers when the extra queue delay is smaller than a cold load. Do not let warm affinity create an overloaded single worker. A release swaps the registry pointer for new requests while old requests finish on their pinned revision. Keep cache keys for any reusable inference state adapter-specific.

3. Work through the example

With a hypothetical 256 MiB resident footprint per adapter and a 4 GiB adapter budget, at most 16 fit before overhead. If loading takes 400 ms, routing to a warm worker with 80 ms extra queueing saves about 320 ms for that request, assuming equivalent execution and network costs.

4. Failure cases and trade-offs

Unpinned eviction can race with execution. Accepting arbitrary adapter paths risks loading untrusted artifacts. A hot tenant can monopolize warm slots, while uniform quotas may waste memory on idle tenants. Use measured demand with minimum isolation guarantees and cap concurrent cold loads.

5. Validation and acceptance

Alternate two adapters that produce distinguishable fixture outputs. Evict under concurrent load, roll a revision and revoke access. Track wrong-adapter responses as correctness failures, plus cold-load latency, eviction churn and tenant tail latency.

6. Follow-ups and self-review

How would you support adapters with different ranks? Reward immutable identity, compatible base models, safe lifetime management and fair cold-load handling.

Sources and related practice

vLLM documents LoRA serving capabilities; routing, isolation and memory assumptions here are original design choices.

Read the primary technical reference

Reference retrieved October 3, 2026. Retrieval date is not an interview or source publication date. The reference supports the named concept; scenario, architecture, examples and rubric are original.

Continue with Distribute and safely activate a large model; Design a model-serving platform.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.