Pidoku

Building the Platform: A Roadmap

Module 21 Lesson 21.m 1h 15m Difficulty 4/5

Prerequisites 21.a–21.l


Before you start: words you need#

WordPlain meaning
RoadmapThe order in which a team builds or adopts things, with the reason for each step.
Adopt vs buildUsing an existing open-source or managed component, versus writing your own.
TriggerThe event or measurement that says a stage is now worth doing.
Ongoing costThe engineering time a component needs every year after it is built: upgrades, incidents, on-call.
ShowbackShowing each team what its usage costs, without billing them for it.
Value curveHow much benefit each extra unit of effort buys. For platforms it rises fast, then flattens.

1. What is it?#

The previous twelve lessons describe the parts of an inference platform. This one is about the order: what to adopt or build first, what to postpone, and how to decide the next step.

The principle: build in order of value per unit of effort, and never ahead of demand. Most platforms that disappoint do so not because a part was built badly, but because the team built a sophisticated scheduler before it had a second model, or a multi-region control plane before it had a second region’s traffic.

the wrong question:  "what does a complete platform look like?"
the right question:  "what is the most valuable thing we do not have, and how do we know?"

In 2026 the answer to “build or adopt?” is mostly adopt: engines (vLLM, SGLang), endpoint pickers and frameworks (llm-d, Dynamo), AI gateways, Kueue or KAI for scheduling, the GPU Operator and DCGM. The platform team’s work is choosing, configuring, connecting and measuring them, and building only where its policy is unusual.

Facts checked on 13 November 2026.


2. Why does it matter?#

  • Effort is the scarce resource. A team of five can run about one significant project per quarter each. Spending a quarter on the wrong thing delays everything after it.
  • Every component is forever. Whatever you build, you upgrade, debug and carry on-call for.
  • Early stages unlock later ones. Without per-request cost records you cannot show that any later optimisation helped, or justify consolidating teams onto a shared fleet.

3. Simple analogy#

Building a restaurant group. You do not design the central kitchen, the franchise manual and the delivery fleet before the first restaurant is busy. First one kitchen that cooks well, then a till that records every order, then a second site when the first has queues out of the door, and the central kitchen only when ten sites are buying the same ingredients.


4. Tiny example: one team, one quarter#

A team serving two models to four internal teams has measured three things: prefill is 35% of GPU time and the prefix hit rate is 30% (21.h); the two largest models run in BF16; and placement is static while demand has shifted. Ranked by expected saving per engineer-week (section 6):

1. FP8 weights for the two largest models     ~25% of the bill   4 weeks    (13.e)
2. adopt the llm-d Router for prefix routing  ~12%               3 weeks    (21.h, 21.j)
3. demand-based placement controller          ~15%              10 weeks    (21.e)

Items 1 and 2 fit in one quarter and are both adoption, not invention. Item 3 waits for the next quarter and a re-measurement, because items 1 and 2 change the numbers it depends on.


5. Technical explanation#

Stage 0: before you have a platform#

YOU HAVE   one model, one team, one deployment
DO         run vLLM or SGLang directly (15.f) behind its OpenAI-compatible API
           tune it properly (19.d, 20.d)
           metrics (22.j) and structured per-request logs with token counts
           a capacity calculation on paper (12.q, 23.b)
DON'T      build a registry (a YAML file in Git is fine), a router, a control plane
TIME       days

Many organisations should stop here. A well-tuned single deployment serves a lot of traffic.

Stage 1: the essentials#

Trigger: a second team wants the model, or a second model appears.

1. GATEWAY (21.i)                              ~2 weeks, mostly configuration
   adopt an AI gateway: keys and scopes, token limits, usage records
   → first, because policy lives here and every new tenant otherwise
     becomes a one-off integration
2. PER-REQUEST COST ATTRIBUTION (23.c, 22.j)   ~1 week
   → early, because the data must accumulate before you need it
3. MINIMAL REGISTRY (21.b)                     ~1 week
   models as OCI artifacts or in an object store, checksums, aliases, a promotion gate
4. LOAD-AWARE ROUTING WITH AFFINITY (20.f, 21.g)  ~1 week
   an Inference Extension gateway with an endpoint picker; session affinity at least
5. SLOs AND DASHBOARDS (23.a, 22.j)            ~1 week
TOTAL      about 6 weeks for 2–3 engineers

No scheduler, no control plane, no multi-tenancy machinery beyond limits. Those come when the pain arrives.

Stage 2: efficiency#

Trigger: cost is a concern, or five or more models.

 6. PREFIX-AWARE ROUTING (21.h)          measure the value first (21.h section 7)
 7. QUANTIZATION PIPELINE (Module 13)    offline quantization, evaluation harness, registry
 8. PLACEMENT AND SCHEDULING (21.e)      Kueue or KAI, demand-based replica counts,
                                         hot / warm / cold tiers
 9. MULTI-TENANCY (21.f)                 priorities, fair sharing, quotas, showback
                                         → enables consolidation onto one fleet
10. AUTOSCALING (20.g, 23.d)             predictive plus reactive on queue wait
TOTAL      about 10–12 weeks

Item 9 unlocks the largest saving: teams that each held their own peak headroom share one fleet and one headroom (21.f). It needs the trust that items 2 and 5 create: teams agree to share only when they can see their own usage and their own SLOs.

Stage 3: scale and reliability#

Trigger: a second region, an availability commitment, or 20+ models.

11. CONTROL PLANE PROPER (21.a)          registry as a service, config distribution with
                                         last-known-good, deployment controller
12. FAULT TOLERANCE (23.e, 21.l)         validation, automatic cordon and repair,
                                         game days, circuit breakers
13. ROLLOUT AUTOMATION (23.g)            progressive delivery with quality gates
14. MULTI-REGION (23.f)                  weight distribution, failover, DR plan
15. CASCADES AND FALLBACKS (21.k)        measured against a ceiling
16. MULTI-LORA SERVING (18.g, 20.i)      if you serve many fine-tunes
TOTAL      several months

Stage 4: advanced, only when measured#

17. Disaggregated prefill / decode (14.j, 21.j)   long prompts, strict TTFT and ITL, at scale
18. Tiered and shared KV cache (14.k, 14.l)       long shared prefixes, a fast network
19. Speculative decoding at scale (13.n)          decode-bound at low batch
20. Learned model routing (21.k)                  heuristics leave measurable value
21. Custom kernels (5.b, 6.e)                     a specific, profiled gap nothing else fills

Each is a significant investment with modest returns compared with stages 1–2, and each must be justified by a measurement of the bottleneck it addresses.

The value curve#

cumulative value
   ▲
   │                                            ┌─── stage 4 (marginal, specific)
   │                                  ┌─────────┘
   │                        ┌─────────┘  stage 3 (reliability)
   │            ┌───────────┘
   │            │  stage 2 (efficiency)
   │    ┌───────┘
   │    │  stage 1 (essentials: enable everything else)
   │ ┌──┘
   │ │ stage 0
   └─┴────────────────────────────────────────────────► effort
     days  ~6 weeks    ~4 months      ~1 year     year 2+

Teams that build stage 4 first struggle. They run a disaggregated, KV-tiered architecture and have no cost attribution, so they cannot tell whether it helped.

The anti-roadmap: what not to build#

✗ YOUR OWN INFERENCE ENGINE          contribute to vLLM or SGLang instead (15.f)
✗ YOUR OWN ENDPOINT PICKER           configure llm-d, Dynamo or SGLang's gateway; write a
                                     plugin if your policy is unusual (21.j)
✗ A GENERIC "ANY MODEL" ABSTRACTION  six months on the abstraction, one model type served
✗ A SCHEDULER BEFORE MANY MODELS     a YAML file says where five models run
✗ MULTI-REGION BEFORE A SECOND REGION'S TRAFFIC
✗ A CUSTOM UI OR METRICS SYSTEM      Grafana and Prometheus
✗ PERFECT COST ATTRIBUTION FIRST     approximate token-weighted attribution gets you most of
                                     the way; ship it and refine

Staffing and ownership#

1–2 engineers   stages 0–1; use managed services and adopt aggressively
3–5 engineers   stage 2; where most platforms should be
6–10 engineers  stage 3; multi-region, high availability
10+             stage 4, or very large scale

SKILLS          distributed systems (most of the work), enough ML to reason about
                quality, SRE and operations, at least one person deep on GPU performance

The most common staffing mistake is hiring for ML research when the job is mostly distributed systems. The platform needs systems engineers who understand enough ML.


6. Under the hood: ranking the next item#

Every quarter, for each candidate:

1. What measurement shows this is a problem?   none → do not build it; measure first
2. What is the expected gain?                  Amdahl (13.a): a 2x speed-up of 10% of
                                               GPU time saves 5%
3. What is the effort to build or adopt?
4. What is the ongoing cost per year?
5. Is there a cheaper alternative?             a flag, an existing project, doing nothing
6. Rank by gain ÷ (effort + ongoing cost over your horizon). Do the top item. Re-measure.

The program below applies step 6. The gains and efforts are example inputs for illustration; yours must come from your own measurements.

Go
// rank.go — rank platform work by measured gain per unit of total cost.
// gain: expected saving or improvement, as a share of the GPU bill (from a measurement).
// build: engineer-weeks to build or adopt. run: engineer-weeks per year to operate it.
package main

import (
	"cmp"
	"fmt"
	"slices"
)

type item struct {
	name            string
	gain            float64 // share of the GPU bill saved, e.g. 0.12 = 12%
	build, runPerYr float64 // engineer-weeks
	measured        bool    // is the gain backed by a measurement on our traffic?
}

func main() {
	const horizonYears = 2.0
	items := []item{
		{"prefix-aware routing (adopt llm-d Router)", 0.12, 3, 4, true},
		{"FP8 weights for the two largest models", 0.25, 4, 2, true},
		{"demand-based placement controller", 0.15, 10, 8, true},
		{"prefill/decode disaggregation", 0.10, 16, 12, false},
		{"custom attention kernel", 0.04, 20, 6, false},
		{"multi-region active-active", 0.00, 24, 16, true}, // reliability, not cost: decided separately
	}
	score := func(it item) float64 { return it.gain / (it.build + horizonYears*it.runPerYr) }
	slices.SortFunc(items, func(a, b item) int { return cmp.Compare(score(b), score(a)) })

	fmt.Println("rank  gain  build  run/yr  saved per 10 eng-weeks  item")
	for i, it := range items {
		note := ""
		if !it.measured {
			note = "  ← measure first"
		}
		fmt.Printf("%4d  %3.0f%%  %5.0f  %6.0f  %22.1f%%  %s%s\n",
			i+1, 100*it.gain, it.build, it.runPerYr, 100*10*score(it), it.name, note)
	}
}

Output:

rank  gain  build  run/yr  saved per 10 eng-weeks  item
   1   25%      4       2                    31.2%  FP8 weights for the two largest models
   2   12%      3       4                    10.9%  prefix-aware routing (adopt llm-d Router)
   3   15%     10       8                     5.8%  demand-based placement controller
   4   10%     16      12                     2.5%  prefill/decode disaggregation  ← measure first
   5    4%     20       6                     1.2%  custom attention kernel  ← measure first
   6    0%     24      16                     0.0%  multi-region active-active
  • The cheap, measured items win by a wide margin, as section 4 said.
  • Unmeasured items are flagged, not ranked away: the next task for them is a measurement.
  • Reliability work such as multi-region scores zero on cost. It is decided by an availability commitment (23.a, 23.f), not by this formula; keep the two kinds of decision separate.

7. Performance implications#

  • Measure before and after every stage. Cost per million tokens, TTFT and ITL at p50 and p99, GPU utilisation from DCGM (22.d). A stage that does not move a number did not help.
  • Optimisations interact. Quantization changes the prefill share, which changes what prefix-aware routing is worth; consolidation changes the fragmentation that placement fixes. Re-rank after each step, from new measurements.
  • The biggest single lever is usually consolidation: one shared, well-utilised fleet instead of many lightly loaded ones (21.f).

8. Production implications#

  • Write the roadmap down, with the measurement behind each item and the trigger for each stage.
  • Adopt first, extend second, build last. Contribute fixes upstream so you are not carrying a fork.
  • Count ongoing cost. Every component you own needs upgrades and on-call; the open projects release monthly.
  • Keep a “not building” list and revisit it each quarter.
  • Plan upgrades as work. Engines, frameworks and drivers move fast; budget time each quarter to stay within a few releases of current.

9. Common mistakes#

  1. Building ahead of demand: a scheduler before a second model.
  2. Stage 4 before stage 1: sophistication without cost attribution.
  3. Building what can be adopted: a custom router, gateway or engine.
  4. No measurement behind roadmap items.
  5. Ignoring ongoing cost when ranking.
  6. Ranking once. The numbers change after every step.
  7. Mixing reliability and cost decisions in one formula.
  8. Hiring ML researchers for a distributed-systems job.

10. Hands-on exercise#

  1. Assess where you are. For a platform you know, mark which items from stages 0–4 exist. What is the most valuable missing item?
  2. Run rank.go with your own candidates and your own measured gains. Which items need a measurement before they can be ranked?
  3. Justify the top item. Produce the measurement that proves it is a problem. If you cannot, that measurement is your real next task.
  4. Check the anti-roadmap. Is anything on your current plan in section 5’s list? Why?
  5. Write the one-pager: current state, the next three items with their measurements, what you are explicitly not building, and the trigger for the next stage.

11. Interview questions#

  1. What would you build or adopt first for an inference platform, and why?
  2. What would you not build, and why?
  3. How do you decide what to do next quarter?
  4. Why does building a scheduler before having many models fail?
  5. What is usually the largest economic lever on a shared platform?
  6. Why must ongoing cost be part of the ranking?
  7. What skills does an inference platform team need?

12. Further reading#

Checked on 13 November 2026.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in