← All interview notes
Parasail · system design prep · backend technical interview 2026-11-23, 10:30 CT

Parasail: system design prep

A 75-minute call: about 60 minutes designing a system from scratch in Excalidraw, plus a short walkthrough of a few of your projects. Here is what they said they'll look at, the vocabulary of inference serving, and five practice questions with Excalidraw templates.

The prep plan for this morning ↓

0. Plan for this morning

About two hours, then a warm-up at 10:00. Ticks are saved in this browser.

  1. Drag parasail-interview.excalidrawlib onto the Library panel in Excalidraw Plus, next to your general pattern library. Orange items are the five Parasail questions.

  2. Read the Parasail profile for the snapshot, history (the d-Matrix prefill/decode split) and engineering stack. Skip funding.

  3. Say each of the ten terms in a sentence out loud. Do the KV cache and tokens-per-day arithmetic once on paper so the numbers are yours.

  4. This is the most Parasail-shaped question for a backend role. Timer on, blank canvas, draw it yourself, then compare with Q1 and the orange Q1 API template. Note one thing you missed from each deep dive.

  5. Q2 metering is the classic backend follow-up (exactly-once billing). Q3 autoscaling is where cold start and brokered capacity come up. Read the default answers; skip the examples you already know.

  6. The email asks for a brief walkthrough of a few projects: problem, your part, outcome. Say each story in section 8 out loud in under two minutes.

  7. Read lines worth having ready and pick two questions to ask. Open Excalidraw, check both libraries are there, check mic and camera. If there's time left, skim Q5 for vocabulary.

1. What the email says they'll judge

The recruiter's note is explicit. It's a whiteboard-style discussion where you design a real-world system from scratch. "The goal is not perfect detail", but how you approach an open-ended problem, communicate trade-offs and structure a solution. They name four things:

  1. Clarifying requirements. Ask early and confirm assumptions, so the interviewer can course-correct quickly.
  2. Identifying constraints. Scale, latency, cost, consistency. Say the numbers.
  3. Proposing a high-level architecture. Boxes first, then go deeper where it matters.
  4. Trade-offs and scaling. Say the "why" behind every decision. That's the signal.

They also say drive the discussion collaboratively: propose, check, adjust. For the non-technical part, they want a brief walkthrough of a few relevant projects: what problem, your specific contribution, the outcome. The interviewer is a Parasail software engineer, and the role is a backend role.

The question may not be about inference at all ("design a real-world system" could be a URL shortener or a chat app). If so, use the general pattern library and the canvas. But a Parasail engineer is likely to pick something near home, so the rest of this page is about that.

2. What they build, in one breath

Parasail sells open-model inference by the token: Kimi, GLM, DeepSeek, gpt-oss and 40+ others behind an OpenAI-compatible API. Products are serverless per-token endpoints, priority "elastic" endpoints, dedicated reserved GPUs and a discounted batch tier. The pitch is "commit to spend, not GPUs": they aggregate capacity from about 40 third-party data centers plus their own Hopper and Blackwell fleet, and route work across it.

Two things make their backend interesting. First, heterogeneous, brokered capacity: GPUs they don't own, in data centers they don't run, that can disappear. Second, the 2026-07 d-Matrix partnership runs prefill on NVIDIA GPUs and decode on d-Matrix chips ("disaggregated inference"). They claim trillions of tokens a day. Customers are AI startups who care about cost per token, latency and "no silent quantization".

3. Which patterns they will probe

AreaPattern labelsWords to use
Inference APIRead heavy (request/response) + real-time streamingToken rate limits, admission control, SSE streaming, TTFT, router, priority queue
Metering and billingWrite heavy / event driven + transactionalUsage events, idempotency key, ledger, reserve then settle, reconciliation
CapacityWorkflow orchestration (control plane)Autoscaler, placement, bin packing, cold start, warm pool, drain
Batch tierBatch/analytics + workflowShards, leases, checkpoints, preemption, deadline scheduling
Serving internalsReal-time + cachingContinuous batching, paged KV cache, prefix cache, prefill/decode split, speculative decoding

4. Ten terms they'll assume you know

Prefill vs decode
Prefill processes the whole prompt in one pass: compute bound, fast per token. Decode makes one token at a time per sequence: memory-bandwidth bound. That difference drives almost every serving decision.
TTFT / TPOT
Time to first token (mostly queueing + prefill) and time per output token, also called inter-token latency (decode speed). Two separate SLOs. Users feel TTFT; agents feel total time.
KV cache
The attention keys and values saved for every token so far, so decode doesn't recompute them. It lives in GPU memory and caps how many sequences fit. Llama-3-70B: 2 × 80 layers × 8 KV heads × 128 dims × 2 bytes ≈ 320 KB per token, so an 8k-token conversation is about 2.6 GB.
Continuous batching
The server adds and removes sequences from the running batch at every step instead of waiting for a whole batch to finish. The reason vLLM and SGLang get high throughput.
PagedAttention
vLLM's idea: store the KV cache in fixed-size blocks, like OS memory pages, so memory isn't wasted on fragmentation and blocks can be shared.
Prefix caching
Reuse KV blocks for a prompt prefix already seen (a shared system prompt, an agent's growing conversation). Cuts TTFT and cost. Makes routing "sticky": send a request to the replica that already has its prefix.
Disaggregated serving
Run prefill and decode on different machines (even different chips) and ship the KV cache between them over a fast network. Parasail does this with GPUs for prefill and d-Matrix for decode.
Speculative decoding
A small draft model guesses several tokens; the big model checks them in one pass. Same output, faster decode when guesses are often right.
Tensor parallelism / quantization
TP splits one model's layers across GPUs in a node (a 70B model at fp16 is 140 GB, so it needs at least 2 H100s). Quantization (fp8, int4) shrinks weights and KV cache. Parasail promises "no silent quantization", so the precision a customer gets is a product promise.
Goodput
Requests per second that actually meet the latency SLO. Throughput you can sell, not raw tokens per second.

5. How to run the 60 minutes

  1. Requirements, 7 min. Functional, then non-functional (latency, availability, consistency, cost), then out of scope. They asked for this explicitly, so make it visible: write the list on the canvas.
  2. Numbers, 5 min. Round hard. 1 day ≈ 100k seconds. 1 trillion tokens/day ≈ 10M tokens/s. At ~3k tokens per request that's ~3k requests/s average, maybe 10k at peak.
  3. Label the pattern out loud, then API and data model, 5 min.
  4. High-level boxes, 13 min. Drag the closest template, then adapt it to what they said. Check in: "Does this match what you had in mind?"
  5. Deep dives, 25 min. Pick the two riskiest parts yourself. For each: the problem, two options, the trade-off, your default answer. Let them steer you to a third.
  6. Wrap, 5 min. Failure modes, what you'd monitor, what you'd build next.

Leave 10 to 15 minutes in the call for the project walkthrough and your questions. The "Interview canvas" template in the general library has these columns.

6. Practice questions

Try each one cold for 20 to 25 minutes in Excalidraw, then open the sketch answer. The matching diagram is in the Parasail library under the same Q number.

Q1Design a serverless inference APIOpenAI-compatible, pay per token, 40+ models, streaming, 10k requests/s at peak, running on your own GPUs plus partner data centers. (The most Parasail-shaped question.)

Label: request/response with real-time streaming, plus a routing layer over a pool of scarce, uneven workers.

Clarify

  • Which endpoints: chat completions, embeddings, both? Streaming required?
  • Latency targets: TTFT p95 under 1 s? Different tiers (priority vs best effort)?
  • How many models, and how skewed is traffic? (Usually a few models take most of it.)
  • Multi-tenant on shared replicas, or does anyone get dedicated capacity?
  • Is cost per token a first-class goal? (Yes. Say so.)

Numbers

10M tokens/s across the fleet. Assume one 8-GPU node serving a 70B-class model does around 20k tokens/s blended (state it as an assumption): that's ~500 nodes, ~4,000 GPUs. GPUs are the cost, so every design choice is about keeping them busy without blowing TTFT. The control traffic itself (10k requests/s) is small for the gateway.

Sketch

Clients call POST /v1/chat/completions with an API key. The gateway authenticates, applies per-key limits in tokens per minute as well as requests, checks the account has credit, and holds the SSE stream open. A router looks up the model in the catalog, picks a pool and a replica using health, queue depth and KV cache headroom, preferring the replica that already has the prompt's prefix cached. Each pool has a priority queue in front so the router can admit, queue or reject. Model servers (vLLM/SGLang) run continuous batching and stream tokens back. Overflow goes to brokered capacity behind the same interface. At the end of each request the server emits a usage event (tokens in, tokens out, model, account, request_id) to metering.

Deep dives

  1. Rate limiting in tokens, not requests

    Example One customer sends 100 requests/min with 100k-token prompts. Request limits say fine; the GPUs say no.

    Default answer Token-bucket per key on estimated tokens (prompt length + max_tokens), reserved at admission and corrected when the request finishes. Keep counters in Redis per region; small overshoot is acceptable.

  2. Routing: load vs cache affinity

    Example An agent sends a 30k-token conversation that grows each turn. On the same replica, the prefix is cached and TTFT is 200 ms; on a random one, it's 3 s.

    Default answer Consistent hashing on a prefix hash (or session id) to pick a preferred replica, with a load check: if it's overloaded, fall back to the least-loaded replica. Affinity is a hint, never a requirement.

  3. Overload: queue, shed or degrade

    Example A new model launches on day 0 and traffic is 5× what was provisioned.

    Default answer Bounded queues per pool and priority tier; reject fast with 429 and Retry-After when the queue's expected wait exceeds the TTFT budget; spill to brokered capacity. Never switch to a quantized model without telling the customer.

  4. Failure mid-stream

    Example A partner node dies after streaming 400 tokens.

    Default answer You can't transparently retry a half-sent stream. Send an error event, bill the tokens actually delivered, and let the client retry. Health checks and draining keep this rare; replicas are cattle.

Q2Design token metering and billingCount every input and output token per account and model, show usage in near real time, stop prepaid accounts at zero, invoice monthly.

Label: write heavy / event driven, feeding a transactional ledger.

Clarify

  • Prepaid credits, postpaid invoices, or both? Hard stop at zero or soft limit?
  • Pricing dimensions: model, input vs output, cached tokens, tier (batch is cheaper)?
  • How fresh must the usage dashboard be? (A minute is fine; the balance check is the hard part.)
  • Who counts the tokens: the gateway or the model server? (The server knows the truth.)

Numbers

One usage event per request, not per token: ~3k events/s average, ~10k peak, ~300M a day at ~200 bytes, about 60 GB/day raw. Easy for Kafka and an OLAP store. The money is large though: a 1% counting error is a real revenue or trust problem.

Sketch

Model servers emit a usage event at request end (and on abort) with a request_id. Events go to a Kafka topic keyed by account. A stream aggregator dedups on request_id, prices with a versioned price book, writes to an append-only usage ledger (ClickHouse or Parquet) and decrements a fast balance counter. The gateway checks the balance before admitting a request and reserves an estimate. Invoicing runs monthly from the ledger into Stripe. A daily reconciliation compares the ledger against server logs.

Deep dives

  1. Exactly-once billing

    Example An aggregator crashes after writing to the ledger but before committing its Kafka offset; on restart it re-reads the events.

    Default answer At-least-once delivery plus an idempotent write keyed by request_id gives an exactly-once effect. The ledger is the source of truth; counters are a cache you can rebuild.

  2. Stopping overspend without a slow hot path

    Example A prepaid account with $5 left fires 200 parallel requests.

    Default answer Reserve max_tokens × price at admission against a Redis balance (atomic decrement), settle the real cost at the end, release the rest. Accept a small bounded overshoot instead of a global lock.

  3. Aborted and failed requests

    Example The client disconnects after 300 output tokens; or the server fails before the first token.

    Default answer Bill what was generated (the GPU did the work). Don't bill server-side failures. Emit the usage event from a finally path so aborts aren't lost.

  4. Price changes

    Example Token prices drop mid-month, as they often do.

    Default answer Store raw token counts in the ledger and price with an effective-dated price book, so you can re-price or explain any invoice.

Q3Design GPU capacity management and autoscalingKeep 40+ models served across your own fleet and brokered partner capacity, scale with demand, and keep cost per million tokens low.

Label: workflow orchestration (a control plane) reading real-time signals.

Clarify

  • Which GPU types, and which models fit on which? Does a model need one GPU or eight?
  • How fast does traffic change? Is scale to zero allowed for rare models?
  • What does brokered capacity look like: an API to lease nodes, with what notice before it's taken back?
  • Is the goal latency SLO first, cost second? (Usually yes.)

Numbers

A 70B model at fp16 is 140 GB of weights. From local NVMe at ~5 GB/s that's ~30 s to load; from object storage over the network it can be minutes, plus engine warm-up. That's your cold start, and it's why you can't scale like web servers.

Sketch

Model servers report queue depth, TTFT p95, KV cache use and tokens/s. A per-model autoscaler turns that into a desired replica count against a goodput target. A placement service finds capacity in an inventory of owned nodes, partner leases and spot, choosing on GPU type and memory fit, cost and region. It starts replicas on Kubernetes in the owned fleet or leases through partner APIs, pulls weights from a cache (object store to local NVMe), and registers ready replicas with the router. Scale-down drains first.

Deep dives

  1. Cold starts

    Example A model idle overnight gets a burst at 9 AM and every request waits three minutes.

    Default answer A warm floor for popular models, pre-staged weights on local NVMe, predictive scaling from daily patterns, and queue-then-scale for the rare long-tail models (with an honest error if the wait exceeds the SLO).

  2. What to scale on

    Example GPU utilisation reads 100% whether the batch is efficient or the queue is exploding.

    Default answer Scale on queue wait and KV cache pressure against the TTFT SLO, not on GPU or CPU utilisation. Hysteresis so it doesn't flap.

  3. Capacity that vanishes

    Example A partner data center reclaims 64 GPUs with two minutes' notice.

    Default answer Treat brokered replicas as preemptible: spread each model across providers, drain on notice, let in-flight requests finish or fail fast, and backfill from owned capacity. Track reliability per provider and route away from bad ones.

  4. Bin packing vs isolation

    Example Ten small 8B models each need a fraction of a GPU; one 400B model needs a whole node.

    Default answer Pack small models several to a GPU (or share replicas with LoRA adapters), give big models tensor-parallel nodes, and keep dedicated customers on reserved nodes so a noisy neighbour can't touch them.

Q4Design the batch inference tierCustomers upload a file of a million prompts and get results within 24 hours at half price, using GPUs the online service isn't using.

Label: batch processing with a job workflow.

Clarify

  • Input format (JSONL with a custom_id per line, like OpenAI's Batch API)? Max file size?
  • Hard 24 h deadline or best effort? Partial results allowed?
  • Can batch work be preempted by online traffic? (It should be.)

Numbers

1M prompts × 1.5k tokens ≈ 1.5B tokens. At 20k tokens/s per node, that's ~21 node-hours, so a few spare nodes overnight clear it easily. The trick is using idle capacity, not adding capacity.

Sketch

The batch API validates the upload, stores it in object storage, splits it into shards (say 1k lines) and records batch, shard and status in a job DB. A scheduler leases shards to workers running on idle GPUs, ordering by model (avoid swapping weights) and deadline. Workers run big batches for throughput, checkpoint per shard and write output files. Online pools lend capacity when idle and take it back when traffic rises. Usage goes to metering at the batch price.

Deep dives

  1. Preemption

    Example Online traffic spikes at 9 AM and needs the GPUs batch is using.

    Default answer Shards are small and leases expire, so a preempted worker loses at most one shard. Completed rows are idempotent by custom_id, so reruns are safe.

  2. Meeting the deadline

    Example A batch is 40% done at hour 20 because the day was busy.

    Default answer Earliest-deadline-first scheduling, and escalate shards near the deadline to guaranteed capacity. Fill idle capacity first because it's cheapest.

  3. Throughput tricks

    Example Many prompts in one batch share a long instruction prefix.

    Default answer Group by model and sort by prefix so the prefix cache hits; use large batch sizes since latency doesn't matter.

Q5Inside one model deployment: how do you serve it fast and cheap?A deep dive they may ask after Q1: batching, KV cache memory, prefix routing and splitting prefill from decode.

Label: real-time serving with a cache in the middle. You're a backend engineer, so stay at the system level: you don't need to write kernels.

Clarify

  • Typical prompt and output lengths? (Agents: long prompts, short outputs. Chat: the reverse.)
  • Which SLO matters most: TTFT, tokens per second, or cost?
  • What hardware: one GPU type, or GPU + d-Matrix like Parasail?

Numbers

70B model on 8 × H100 (640 GB). Weights in fp8 ≈ 70 GB, leaving ~550 GB for KV cache. At 320 KB per token (fp16 KV) that's ~1.7M tokens in flight: about 200 sequences of 8k tokens. KV memory, not compute, usually caps the batch.

Sketch

A cache-aware router hashes the prompt prefix to pick a replica. In the simple setup, each replica runs an engine loop with continuous batching and paged KV blocks, sharing prefix blocks across requests. In the disaggregated setup, prefill workers (compute-heavy GPUs) process the prompt and ship the KV cache over RDMA to decode workers (memory-bandwidth-heavy chips), which stream tokens. Speculative decoding speeds up decode where a good draft model exists.

Deep dives

  1. Throughput vs latency

    Example A bigger batch doubles tokens/s per GPU but each user's stream slows down.

    Default answer Cap batch size per tier: priority endpoints run smaller batches at a higher price, batch tier runs huge ones. That's how one fleet sells both.

  2. When to split prefill and decode

    Example A 50k-token prompt's prefill stalls decode for everyone else on the replica.

    Default answer Disaggregate when prompts are long and TTFT and TPOT interfere; the cost is moving the KV cache across the network. Chunked prefill is the cheaper first step on one box.

  3. KV cache runs out

    Example Lots of long conversations arrive and memory is full.

    Default answer Admission control on KV headroom, preempt (swap to CPU or recompute) the lowest-priority sequences, evict cold prefix blocks first (LRU).

7. Lines worth having ready

  • The token is the unit of everything here: rate limits, scheduling, capacity and billing. I'd design around tokens, not requests.
  • TTFT and tokens per second are two different SLOs. Prefill is compute bound and decode is memory bound, which is why you'd split them onto different hardware.
  • Billing has to be exactly-once in effect: at-least-once events, dedup on request_id, and the ledger as the source of truth.
  • Cold start is a weight-loading problem, so keep a warm floor for popular models and stage weights on local NVMe.
  • Brokered capacity can disappear, so every replica is cattle: health check, drain, retry somewhere else.
  • I built a small version of this: an LLM proxy where a student who cancels a stream still gets charged, because the meter keeps reading after the client leaves. Reconcile against the real bill, because that's how I found cache writes were priced 1.25×.
  • Bigger batches buy throughput with latency. Priority tiers let one fleet sell both.

8. Your project walkthrough

The email asks for a few projects: the problem, your specific contribution, the outcome. Keep each under two minutes and end with why it matters for Parasail. Lead with the LLM proxy: it's a small version of Parasail's own API, metering and billing. Then pick one or two Netflix stories depending on whether they want scale or reliability.

1. AI tools LLM proxy (lead with this)
Problem: students in your AI course needed real model access (OpenAI, Anthropic and open-source models) without seeing your API keys or running up your bill. Usage only arrives at the end of a stream, so a student who cancels just before the end would get every call for free. Your part: built the streaming reverse proxy: per-student auth, per-cohort budgets, a cap of 8 open calls per student (because cost is only known when a call ends), and metering that keeps reading upstream after a client disconnects so the call is still charged, with an estimate if no usage figures arrive. Then you reconciled your records against OpenAI's bill. You found you were 3 to 8% low because cache writes cost 1.25 times the input price, and fixed it. Outcome: in a load test of 20 students at about 3.6M tokens/min, 240 of 240 calls completed with p95 time to first byte of 0.10 s, and the tokens recorded matched the tokens served exactly (10,753,266). A student over budget was refused without affecting anyone else. You also showed that a class at a 1M tokens/min provider limit lost 59% of its calls, against 0 at 40M. Parasail tie: this is Q1 and Q2 in miniature: token limits, metered streaming, charging aborted calls, and reconciling against the real bill.
2. Netflix fast properties
Problem: the dynamic configuration service for the whole fleet (200,000+ clients, 50,000+ requests/s on DynamoDB) was slow to publish and a common cause of incidents. Your part: owned it; cut publish time 50% to 45 s; built the property canary that flags the riskiest 1% of changes for rollback; the deployment-posture wizard. Outcome: incidents down 20%. Parasail tie: a control plane pushing state safely to a huge fleet, which is what routing tables and model rollouts are.
3. Agentic plugins and pre-flight risk checks
Problem: LLM-assisted change review was expensive and risky deploys still slipped through. Your part: built pre-flight risk assessment of code diffs and agentic plugins. Outcome: 10+ critical failures averted, 60% fewer LLM tokens. Parasail tie: you've been the customer who cares about cost per token. Pair it with the incident analyzer (6,000 incidents) if they ask about data work.
Spares
DVD merchandising server: home page box shots from 3.4 s down to 0.5 to 1.5 s for millions of users with caching and a sticky-cookie client. Use it if caching or affinity routing comes up. Lalo (CTO): scaled the backend 20×, from 100 to 2,000+ customers. Use it if they ask about startup pace or wearing many hats.

9. Excalidraw

Load two libraries. They don't overlap.

General (11 items)
The blank interview canvas and the ten pattern starters. system-design-patterns.excalidrawlib
Parasail (5 items)
The diagrams for Q1 to Q5 above, orange badges Q1 API, Q2 Meter, Q3 Scale, Q4 Batch, Q5 Serve. parasail-interview.excalidrawlib (also in ~/Work/jobs/llm/parasail/interview/excalidraw/ on your Mac)

In Excalidraw Plus, open the Library panel (book icon) and drag the file onto it. During the interview, drag the closest template onto the canvas and edit it to match what they ask. It's a starting point, not an answer: build it up live and explain each box as you add it. Single diagrams open with Menu → Open:

More: the pattern guide and the Parasail company profile.

10. Questions to ask them

  • How does the router decide between your own fleet and brokered capacity, and what happens when a partner takes capacity back?
  • Where does token counting happen today, and how do you reconcile it with what customers see?
  • What does the backend team own: the API and gateway, the control plane, billing? What would I work on first?
  • How has the d-Matrix prefill/decode split changed the serving stack, and is disaggregation going wider?
  • How does on-call work across data centers you don't run?