01Chapter 1: Latency and throughput in model servingEvery decision about batching and autoscaling in this tutorial trades latency against throughput. This chapter defines both terms precisely for a model server. It shows where a request spends its time, and it shows why latency rises as a server approaches its capacity.5 min read
02Chapter 2: Why batching makes accelerators more efficientThis chapter assumes you know how a model is served behind an HTTP or gRPC endpoint, and that you can read p50 and p99 latency figures. It also assumes you can read short Python snippets. It explains the hardware reason batching raises throughput, so that the batching parameters in later chapters ma6 min read
03Chapter 3: Static batching and its limitsThis chapter assumes you can serve a model behind an HTTP or gRPC endpoint, read basic Python, and interpret p50 and p99 latency. The previous chapter explained why accelerators run faster per item on larger batches. Here you will see the simplest way to get those batches, and why it breaks down und6 min read
04Chapter 4: Dynamic batching: grouping requests on the serverThis chapter assumes you can read basic Python and YAML. It also assumes you know what p50 and p99 latency mean, and that you have served a model behind an HTTP or gRPC endpoint. The earlier chapters explained why accelerators run more efficiently on batches. Here the server forms those batches itse5 min read
05Chapter 5: Latency objectives and tail latencyThis chapter assumes you can read basic Python, know what p50 and p99 mean, and have seen an inference endpoint behind HTTP or gRPC. Earlier chapters covered why batching raises throughput and how dynamic batching groups requests. Here you set the latency target that limits how aggressively you can 6 min read
06Chapter 6: Choosing max batch size and max queue delayThis chapter assumes you know what p50 and p99 latency mean and can read Python and a small config file. It also assumes you have seen why batching helps an accelerator and how a dynamic batcher groups requests. Here you will turn those ideas into two concrete numbers for a service, and learn how to6 min read
07Chapter 7: Queueing basics and Little's lawThis chapter assumes you know what latency, throughput, and p50/p99 mean. It also assumes you can read short Python, and that you understand the dynamic batching and max queue delay ideas from the earlier chapters. By the end you will be able to estimate how many requests a model service holds at on6 min read
08Chapter 8: Continuous batching for LLM-style workloadsThis chapter assumes you know the dynamic batching from the earlier chapters: a queue, a maximum batch size, and a maximum queue delay. It also assumes you know what a Kubernetes replica is and what p50 and p99 latency mean. You don't need to know transformer internals. You do need to know that a la7 min read
09Chapter 9: Choosing what to scale onThis chapter assumes you know how dynamic batching works, including max batch size and max queue delay. It also assumes you understand Little's law (in-flight requests = arrival rate × latency) and can read a Kubernetes HorizontalPodAutoscaler (HPA) manifest. The next chapter covers HPA mechanics. T6 min read
10Chapter 10: Horizontal autoscaling of replicasThis chapter assumes you can read a Kubernetes Deployment and a short YAML manifest, and that you know the metrics from earlier chapters: p99 latency, queue depth, and concurrency. You should also know that each replica runs its own dynamic batcher. Here you learn how a controller changes the replic5 min read
11Chapter 11: Stabilization, cooldown, and scaling limitsThis chapter covers the policy layer of horizontal autoscaling: the rules that decide how fast replicas are added or removed, and how far they can go. It assumes you can read Kubernetes YAML, know what a Deployment and a HorizontalPodAutoscaler (HPA) are, and have already picked a scaling signal suc7 min read
12Chapter 12: Cold start and warmupThis chapter assumes you have read the earlier chapters on dynamic batching, queue-based scaling signals, and horizontal autoscaling. It also assumes you can read a Kubernetes Deployment manifest. It covers what happens between "the autoscaler asked for a replica" and "that replica serves its first 6 min read
13Chapter 13: Sizing replicas and planning capacityThis chapter assumes you have read the earlier chapters on dynamic batching, latency objectives, Little's law, and horizontal autoscaling. You should be comfortable with p50 and p99 latency, Python, and a Kubernetes Deployment with a HorizontalPodAutoscaler (HPA). The chapter covers how to turn a tr6 min read
14Chapter 14: Metrics to watch for batching and scalingThis chapter assumes you know what p50 and p99 mean, can read basic Python and YAML, and have met the dynamic batcher and the Kubernetes autoscaler from earlier chapters. It covers which numbers to record, how to read them, and which ones should drive scaling decisions.5 min read
15Chapter 15: Tuning batching and autoscaling togetherThis chapter assumes you know how dynamic batching works (max batch size, max queue delay), how a Kubernetes HorizontalPodAutoscaler (HPA) scales a Deployment, and how to read p50 and p99 latency. It covers how the two mechanisms interact and gives a procedure for tuning them in the right order.6 min read
16Chapter 16: Scale to zero and its trade-offsThis chapter assumes you have read the earlier chapters on horizontal autoscaling, scaling signals, and cold start and warmup. You should know what a replica is, how an autoscaler picks a replica count from a metric, and why a new replica needs time before it can serve traffic.6 min read