Skip to main content
Engineering 12 min read

Self-Host LLM Inference, the Netflix Decision Framework

Learn when to self-host LLM inference instead of paying per token. Netflix's production stack reveals the real cost, latency, and control tradeoffs.

Netflix's in-house LLM serving platform illustrates what large-scale self-hosted inference infrastructure looks like when workload thresholds justify the investment.

Netflix runs its entire LLM serving stack in-house. Not a managed endpoint, not a vendor GPU rental, not a thin wrapper around someone else's API. Their AI Platform team built the deployment pipeline, the inference engine integration, the autoscaling, the observability proxies, and the constrained-decoding logic, all inside the same production environment that already serves their recommendation models. The full architecture writeup is worth reading end to end because it names tradeoffs that vendor decks never will.

Stay in the loop.

Get the latest posts and exclusive content delivered to your inbox.

Join 3 readers. No spam. Unsubscribe in one click, anytime.

The takeaway for everyone else is the opposite of imitation. Netflix self-hosts because their workload crosses specific thresholds on volume, latency, customization, and platform maturity, and when you self-host LLM inference, the same test should drive your call. If yours does not, the per-token API is still the right call. This piece converts Netflix's disclosed choices into a decision framework you can run against your own workload, with honest numbers on where the cost crossover lives, why tail latency changes the math, and the staffing tax that quietly breaks most build-vs-buy spreadsheets.

The core claim: self-hosting LLM inference is a workload-shape decision, not a default win or loss. Most teams underestimate the staffing overhead and overestimate the savings.

Why Netflix Runs Its Own LLM Stack

Netflix's path to in-house LLM serving was not a greenfield bet on GPUs. It was an extension of an existing machine-learning platform that already served XGBoost, TensorFlow, and PyTorch models at member scale. Their unified JVM-based serving system handles routing, A/B logic, feature fetching, inference, and logging. LLMs were slotted into that system behind the same gRPC interface as every other model.

That lineage matters. Netflix did not stand up a new team to run LLMs. They extended a platform that already had deployment, autoscaling, multi-region rollout, and on-call rotations. The marginal cost of adding LLM serving to an existing ML platform is dramatically lower than building that platform from scratch, which is exactly the variable most teams forget when they read Netflix's post and think "we should do that too."

The platform now runs on vLLM as its paved-path engine, integrated with NVIDIA Triton Inference Server, fronted by an OpenAI-compatible HTTP API alongside gRPC. The architecture reflects four production-validated choices: vLLM over TensorRT-LLM for iteration speed, JSON-config packaging over frozen tensor specs, an ecosystem-compatible API surface, and Red-Black plus Versioned deployment strategies for zero-downtime upgrades.

The Four Variables That Actually Flip the Build-vs-Buy Call

The build-versus-buy decision for LLM inference depends on crossing thresholds across workload volume, latency, customization, and staffing.

Most build-vs-buy framings collapse into a binary: APIs are easy, self-hosting is cheap. Neither is reliably true. The decision actually turns on four variables, and you need to cross thresholds on at least two of them before self-hosting pays off.

  1. Sustained token volume. Per-token API pricing is linear in usage. GPU ownership is largely fixed cost with a utilization curve. Below a crossover point, APIs win on pure cost. Above it, idle GPU capacity starts looking expensive in retrospect.

  2. Latency-SLA tightness. If your product needs single-digit-millisecond time-to-first-token or tight p99 bounds, shared-tenant APIs structurally cannot guarantee that. Noisy neighbors, rate limits, and queueing variance are baked into the multi-tenant model.

  3. Customization requirements. Fine-tuned weights, LoRA adapters, custom decoding constraints, quantization experiments, and full prompt-and-response tracing are all materially easier when you own the stack. Hosted APIs constrain or forbid most of these.

  4. Staffing tolerance. Running a production LLM serving platform requires ML platform engineers, on-call rotation, and capacity planning. This is a 24/7 commitment, not a side project.

VariableAPIsHybridFull Self-Host
Token volumeSub-hundreds of millions monthlySpiky or mixed-priority trafficHundreds of millions+ sustained
Latency SLAMedian-focused, loose p99Critical path needs dedicated capacityTight p95/p99 you control
CustomizationStandard weights, no fine-tuningSome custom models, rest on APIFine-tuned weights, constrained decoding
Staffing toleranceNo dedicated platform teamShared with other servicesDedicated ML platform team

Cross zero or one of these thresholds, stay on APIs. Cross two, consider a hybrid setup. Cross three or four, full self-hosting starts to make sense. Netflix crosses all four.

The Cost Crossover Where Token Pricing Loses to GPU Ownership

Self-hosted LLM inference costs hinge on GPU utilization, which determines where the cost crossover with per-token API pricing actually falls.

The cost crossover is the most-asked and least-honestly-answered question in this space. The reason most published comparisons are wrong is that they compare API token costs against GPU rental at low utilization, or they price engineering time at zero.

Per-token API pricing from providers like OpenAI's API scales linearly with usage. A workload generating, say, 500 million tokens per month at a mid-tier model's pricing racks up a predictable bill with zero fixed overhead. GPU ownership, whether reserved or on-demand, carries fixed costs that amortize as utilization rises.

The crossover depends on three factors: your sustained token volume, your achievable GPU utilization, and whether you are comparing against discounted reserved capacity or spot on-demand. Real-world GPU cost analysis shows that naive deployments can waste the majority of their GPU spend on poorly utilized instances, and that getting utilization right can cut inference costs by an order of magnitude. That spread is the difference between self-hosting being obviously cheaper and obviously more expensive.

The framework: estimate your monthly token volume at current API prices. Then estimate GPU hours needed to serve that volume, assuming roughly 30 to 50 percent utilization for a new team and 60 to 80 percent for an experienced platform team. Add staffing cost (next section). If the GPU-plus-staffing total beats the API bill with enough margin to justify the operational risk, self-hosting wins. For most teams below roughly hundreds of millions of tokens monthly sustained, APIs remain cheaper once engineering time is priced in.

One more variable vendors rarely mention: model caching and cold-start. Netflix materializes models on Amazon FSx at announcement time because downloading from S3 or Hugging Face at startup inflates cold-start latency past what schedulers tolerate. That is infrastructure cost you inherit the moment you own deployment.

Latency and Tail Behavior, the Structural Win APIs Cannot Match

If your product is a chatbot where 800ms versus 1.2s is imperceptible, skip this section. If you serve ranking, retrieval, or any real-time decision loop, read it twice.

Hosted LLM APIs are multi-tenant. Your request queues alongside every other customer's traffic. Under load, the p95 and p99 tail latencies can be multiples of the median, and they are outside your control. You cannot inspect the scheduler, you cannot prioritize your traffic, and you cannot fix the noisy neighbor hammering the same GPU cluster.

Self-hosted inference gives you deterministic capacity. Your p99 is a function of your batch size, your model, and your queue depth, all of which you control. Analysis of LLM serving tail latency shows why the heavy-tailed distributions common in inference workloads make percentile control critical, and why naive benchmarking at low concurrency hides problems that only surface under realistic load.

Netflix's own experience reinforces this. Their constrained-decoding workload, where business logic runs inside the decode loop via vLLM's custom logits processor interface, hit a CPU-bound bottleneck under vLLM V0 that was invisible in single-request benchmarks. End-to-end latency became CPU-bound even though the GPU forward pass was batched efficiently. The fix required migrating to vLLM V1's batch-level processing API and rewriting the hot path in C++ with multi-threading to bypass the GIL. That kind of deep optimization is only possible when you own the stack.

For latency-sensitive products, this alone can justify self-hosting regardless of cost. The ability to tune batching, preemption behavior, KV cache sizing, and decode logic to hit a specific p99 target is the structural advantage APIs cannot offer.

Observability and Customization, the Underrated Reasons to Own the Stack

Cost and latency get the attention. Observability and customization are where ownership quietly wins.

On a hosted API, you see what the provider exposes: token counts, latency, maybe a finish reason. On your own stack, you see everything. Netflix's team discovered that vLLM and Triton report metrics through incompatible Prometheus endpoints, and that Triton's built-in bridge surfaces only 9 of over 40 vLLM metrics. They built a lightweight HTTP proxy merging both into a unified /metrics endpoint so dashboards and alerts work without modification. That level of instrumentation, covering token throughput, KV cache utilization, and prefix cache hit rates, is how you actually operate inference at scale. No API gives you this.

Customization runs deeper. Netflix pushes business-logic constraints directly into the decode loop using vLLM's logits processor interface, so models generate compliant outputs by construction rather than generating freely and filtering after. They also handle edge cases the design phase did not anticipate: chunked prefills in vLLM V1 that lack granularity in BatchUpdate, and KV cache preemption under memory pressure that breaks the assumption of monotonically growing token history. Both required custom tracking and state-machine resets inside the decode loop. Try doing that through a hosted endpoint.

Fine-tuned weights, LoRA adapters, custom quantization schedules, and prompt-level tracing all fall into the same category. A quantization benchmark study illustrates the throughput and memory tradeoffs across methods, and the ability to experiment with these on your own infrastructure is a competitive advantage for teams whose model quality directly affects product quality.

The Staffing Tax Most Build-vs-Buy Analyses Hide

Vendors never mention the staffing line item, and most internal spreadsheets omit it entirely.

A credible in-house LLM serving capability requires at minimum: one or two ML platform engineers who own the serving framework, engine integration, and deployment pipeline; an on-call rotation that can respond to GPU node failures, OOM events, and model-loading issues at any hour; and capacity planning that forecasts GPU needs weeks ahead and negotiates reserved capacity. Guidance on ML engineering team structure lays out the roles, reporting lines, and benchmarks for scaling these teams, and the numbers add up fast.

A conservative estimate: one dedicated platform engineer plus a shared on-call rotation across three or four engineers, plus fractional capacity-planning time. Fully loaded, that is a mid-six-figure annual commitment before you buy a single GPU hour. If your API bill is under that number, self-hosting is mathematically worse.

Netflix absorbs this cost because they already run a large ML platform team for recommendation systems, search, and other models. LLM serving is a marginal addition. A team starting from scratch is paying the full platform tax for LLMs alone, which is why so many self-hosting pilots stall after the proof-of-concept phase.

When to Stay on APIs, Go Hybrid, or Self-Host

Run this checklist against your workload.

Stay on APIs if: - Your monthly token volume is below the crossover point (roughly, sub-hundreds-of-millions of tokens). - Your latency SLA is loose (median-focused, no hard p99 requirement). - You use standard model weights without fine-tuning or custom decoding. - You do not have a dedicated ML platform team.

Go hybrid if: - You have a latency-critical or high-volume workload alongside lower-priority traffic. Route the critical path to self-hosted capacity, keep the rest on APIs, and use the API as a fallback when your GPUs are saturated or down.

Full self-host if: - Your token volume clearly exceeds the cost crossover. - You need tight p95 or p99 latency control that APIs cannot guarantee. - You run fine-tuned or custom models requiring adapter serving, quantization experiments, or constrained decoding. - You already operate an ML platform team or can justify hiring one.

The honest default in the current market remains APIs first. Self-hosting becomes defensible once a workload crosses clear thresholds on at least two of volume, latency SLA, and customization, and once the team accepts the staffing commitment.

If You Go Self-Hosted, the Minimum Viable Inference Stack

Most teams over-build their first deployment. They read Netflix's post, count nine components, and try to stand up all nine before shipping a single production request. The honest minimum viable stack is two irreducible pieces. Everything else is deferrable, and each deferrable layer has a specific trigger that tells you when to build it.

The two essentials. You need an inference engine and a serving framework.

vLLM is the default engine. It offers the iteration speed, ecosystem familiarity, and custom-architecture support that motivated Netflix's own migration from TensorRT-LLM. The PagedAttention paper explains the memory management technique that makes continuous batching practical at all.

For the serving layer, NVIDIA Triton Inference Server handles GPU scheduling, model loading, and batching. Hugging Face TGI is the alternative if you want a simpler single-model deployment with built-in safety filters. Ray Serve is the alternative if you already run Ray infrastructure and need distributed multi-model orchestration. Pick based on what your team already operates.

The three deferrable layers. A custom metrics proxy matters only when your dashboards need vLLM and Triton metrics unified and neither tool merges them natively. Netflix hit exactly this gap. FSx-level model caching matters only when cold-start latency from weight downloads breaks your autoscaler. Stateful constrained decoding matters only when business logic must run inside the decode loop. Each layer has a clear trigger. Skip it until that trigger fires.

Patterns that matter only at scale. Red-Black deployment for zero-downtime upgrades with atomic rollback. Versioned deployments for breaking I/O schema changes during transitions. GKE GPU autoscaling guidance covers the cold-start-aware autoscaler tuning you need once traffic justifies multiple GPU replicas.

For teams just starting, a self-hosted LLM tutorial walks through basic deployment. Treat it as a starting point, not an endpoint. Production hardening means iterating toward Netflix's full stack only as your workload demands each piece.

The decision is yours. Make it on workload shape, not vendor promises or engineering envy. APIs remain the right default for most teams. For the ones that have crossed the thresholds, Netflix has shown what the other side looks like.

Stay in the loop.

Get the latest posts and exclusive content delivered to your inbox.

Join 3 readers. No spam. Unsubscribe in one click, anytime.

About the author

Tyler Brooks

Tools Analyst

Tyler has tested developer tooling for a decade, first as a platform engineer and now as an independent analyst. He reviews models, frameworks, and APIs the way he would want them reviewed before relying on them for real work.

Related Posts