Skip to content

Deployment Patterns

Batch, Real-Time, and the Space Between

8 min+80 XPStep 1/10

The first question is 'how fresh is fresh enough?'

Before touching infrastructure, two questions decide the topology: how stale can predictions be, and what latency does the caller need?

Batch scoring runs the model over the whole population on a schedule and writes results to a table — churn scores Sunday night, risk tiers every morning. Cheap, simple, throughput-optimized, and correct for most business decisions. Real-time serving is an endpoint that scores one request in milliseconds, because the user is staring at the screen right now — ad ranking, an ETA while the map is open.

Getting this wrong in either direction is expensive. Batch for a real-time problem means stale predictions; real-time infrastructure for a batch problem means paying a latency tax nobody asked for.

insight

Half of 'we need real-time ML' is a product manager who was never asked what the data is actually worth. A nightly batch answers most business questions just fine.