Batching and horizontal scaling
Batching and horizontal scaling both promise more throughput. Each has a precondition that, unmet, turns the promise into a new failure mode.
L1–L4 are part of the Pro pass
L0 Explain simply
A gate that checks one visitor at a time, however fast, has a scaling ceiling. Two ways past that ceiling are obvious, and both have a catch a beginner would not expect.
The first is to stop checking one visitor at a time and check a whole group at once — one pass over many people instead of one pass per person. That is batching. The catch: an early arrival may wait for a group, but a size target or timer can end that wait; a full group need not wait for the timer too.
The second is to open more gates. That is . The catch: the design must route each visitor to the right paperwork, either through interchangeable gates with shared records or through gates responsible for particular groups. If one gate is the only one holding a particular visitor's paperwork from an earlier stop, sending that visitor to a different gate does not speed anything up — it breaks the check entirely.
Both techniques are standard, both are borrowed from general computing rather than invented for screening, and both are explored in the rungs ahead with the catch made precise rather than left as an intuition.
PLAIN WORDS · 2 in this section
- interchangeable
- one can be swapped for another
- rungs
- steps of a ladder, or levels in rank
PICTURE IT
A shuttle van that waits to fill, and extra ticket desks
Picture a small shuttle van that carries visitors from a car park to a hall. A trip costs the same fuel and driver time whether the van holds one visitor or a full load. So the driver waits until the van is full or a timer runs out, then goes. Each trip is cheaper per visitor, but the first visitor who sat down waits the longest. Now the hall adds more ticket desks for a bigger crowd. This helps when paperwork access and routing are correct; desks can share records or own particular groups. Suppose one desk keeps a private notebook of who has a ticket. A visitor sent to another desk may get a second ticket, and nobody notices. The picture is imagined; real systems differ.
THE REAL JOB Batching and extra copies of a service let screening handle more payments, as long as each technique's precondition holds.
- Checking one record at a time hits a ceiling
- Batching groups records into one matching pass
- A batch waits to fill or for a timer
- Horizontal scaling adds more instances
- Verify correct access, ownership and routing for related requests
- Use a tested shared-state or stateful-partition design
HOW THE PICTURE MAPS
| In the picture | In the payment |
|---|---|
| The van leaving when full or when the timer runs out | A batch sent at its target size or its maximum wait |
| One trip's fuel and driver time shared by everyone aboard | Fixed costs of each call, paid once for the whole batch |
| The first visitor who sat down and waits longest | The first record in a batch, which waits the longest |
| More ticket desks beside the first | More instances of the same matching service, which is horizontal scaling |
| The visitor sent to whichever desk is free | A load balancer spreading requests across instances |
| A private notebook at one desk | Information held in one copy of the service's memory, such as a deduplication window |
| A shared register every desk can read | A shared store, which is what statelessness relies on |
WHERE THIS PICTURE STOPS
- A visitor in the van can see the delay and can walk instead. A record in a batch cannot see it, and its payment rail may give it a deadline.
- A desk with a private notebook gives a visitor an odd look. In a service, a missing note raises no error and no alert, and the health checks still pass. The picture makes the failure look easier to spot than it is.
- The van and the desks are one picture of two separate techniques. A real pipeline can use both at once, and the topic says they are general software techniques, not something built only for screening.
- A full Kafka batch sends before linger expires. A traffic spike can fill it sooner; downstream queueing is a separate delay. Stateful designs can scale with appropriate ownership and routing.
HOOK
Batching: when does it send? Scaling: who owns the state?
REMEMBER IT THIS WAY
A contrast: two neighbours told apart by one test.
Batching: who waits? Scaling: who remembers?
| In the trick | What it stands for |
|---|---|
| who waits | the first record in a batch waits for the batch to fill or a timer to run out |
| who remembers | related requests must reach consistent state, through shared access or correctly owned and routed stateful partitions |
A pipeline can use both techniques, so ask both questions, and neither question locates a delay, which needs a stage-by-stage budget.
TELL A FRIEND
Batching saves effort by checking records together, but every record waits for its batch. Adding copies requires correct state access and routing, through stateless workers or stateful partitions.
OFTEN MIXED UP WITH Throughput, latency and capacity. Throughput and capacity ask how much spare room a system has and how slow its slowest payments get. This topic asks what each way of adding room needs first, and how each one fails quietly when that is missing.
PRACTISE AND KEEP
Sources for this topic — 5 sources
- Market practice
Kubernetes documentation — Horizontal Pod Autoscaling ↗ — The Kubernetes Authors (Cloud Native Computing Foundation) · Horizontal scaling of stateless workloads
Search excerpts only, page not opened, so this was read as search summarisation over the official documentation's own wording.
Kubernetes is a Cloud Native Computing Foundation (CNCF) graduated open-source project with open governance, not a single vendor's product — chosen over a specific cloud provider's load-balancing documentation for that reason.
- Market practice
Site Reliability Engineering: How Google Runs Production Systems — "Monitoring Distributed Systems" ↗ — Google (Betsy Beyer, Chris Jones, Jennifer Petoff, Niall Richard Murphy, eds.) · Percentile monitoring and latency attribution
Freely published in full by Google at sre.google — not a paywalled or excerpted source. Verification boundary: sre.google answers a network egress block through this environment's proxy, so the chapter's argument was confirmed via search summarisation of its publicly indexed content rather than a direct fetch of the page. 2026-10-11: confirmed by search excerpts from sre.google (page not opened): the four golden signals. Timing failed requests separately. Explicit, implicit and policy-based errors. Saturation and the 99th-percentile early signal. 'spend much more effort on symptoms than causes' and 'only worry about very definite, very imminent causes'.
6 November 2026: opened primary chapter, especially The Four Golden Signals and Worrying About Your Tail. Inspected latency of successful versus failed requests, errors, traffic, saturation and percentile monitoring. This does not establish a deployed payment-system SLA.
8 November 2026: primary Chapter 6 Definitions, Why Monitor, Symptoms Versus Causes, Black-Box Versus White-Box, Four Golden Signals and tail discussion opened; selected coverage, actionable alerts and separate success/error latency. Historical practice, not a universal detection guarantee.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Synthetic training examples and engineering illustrations are not deployed-bank benchmarks, universal legal permissions or mandatory vendor architectures.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
- Implementation-specificKafka 4.0
Apache Kafka — Producer Configs ↗ — Apache Software Foundation · Kafka 4.0 producer configs, batch.size (bytes per partition), linger.ms and delivery.timeout.ms; opened 6 November 2026. Full batch or linger ends intentional waiting; backpressure and acknowledgement are separate.
Opened primary Apache Kafka 4.0 documentation on 6 November 2026: batch.size, linger.ms and delivery.timeout.ms. Not a universal screening architecture or a bank benchmark.
- Implementation-specific
Kubernetes — StatefulSets ↗ — Kubernetes Authors · StatefulSets overview/Using StatefulSets and replicas, page modified 12 October 2026, opened 6 November 2026: stable identity and stateful scaling; application state ownership remains a separate design obligation
Opened current primary project documentation on 6 November 2026, StatefulSets and Using StatefulSets. Not a deployed-bank architecture, legal requirement or guarantee of correct application state handling.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.