Google's SRE book gives every request one of four criticality levels. Services are expected to provision enough capacity for all the expected traffic at the top two.
SHEDDABLE_PLUS is the default for batch jobs, which can retry minutes or even hours later. So interactive traffic is what you provision for, and batch gets what's left.
Four mechanisms keep batch out of the way
In a serving system it takes four mechanisms:
- Separate queues, so a 100,000-request batch never sits in front of a person.
- Admission against spare capacity. The dispatcher grants batch leases only while a replica's free capacity is above a reserve kept for interactive bursts.
- Priority inside the engine. On a shared replica, interactive sequences are scheduled first at each step, and batch fills the remaining slots.
- Preemption. When interactive traffic needs KV memory, the engine evicts batch sequences.