Explain like I'm five · Network

What are Traffic Policing & Shaping?

Traffic policing and shaping, told as a story about a counter rule for handling a flood of packages — drop them, or make them queue.

suddenly a flood of packages arrives at oncetaking them all in would jam the whole sorting office

Suddenly a flood of packages arrives at once.Taking them all in would jam the whole sorting office.

✕policing: drop the overflow right awayshaping: queue the overflow and send it in order

There are two choices for handling the overflow.Policing drops the overflow right away; shaping queues it and sends it in order.

POLICINGover limit → dropped nowSHAPINGover limit → queued, waitstraffic policing/shaping = the rule for handling overflow at the counterdrop the overflow, or make it wait — decided in advance per counter

Policing and shaping are rules for what to do with overflow at the counter.Drop the overflow, or make it wait — decided in advance per counter.

Policing = Dropover the limit, dropped at once
Shaping = Queuebuffered, then sent later
Shaping's Cost = Delayqueued packages leave late
Goal = Match a Ratekeeps intake under an agreed limit
COUNTER RULESdrop — policing simply discards the overflowqueue — shaping buffers it and sends laterdelay — shaping drops nothing until its buffer fills, but packages leave lateaverage rate — both keep average intake under an agreed limit

The counter rules come down to four points: drop, queue, delay, and average rate.Policing and shaping both aim to keep the average intake under one agreed limit.

the counter is less jammed nowbut a slow post office still slows deliverypolicing and shaping only control intake — they can't change the route or an office's raw speed

Controlling the flow doesn't fix the road itself.Policing and shaping only control intake — they can't change the route or an office's raw speed.

In one breath

Traffic policing and shaping = a counter rule for overflow: policing drops it, shaping queues it.

Traffic policing instantly drops (or marks) packets that exceed an agreed rate to protect the network, while traffic shaping buffers them and releases them smoothly at that rate instead. Policing accepts loss; shaping accepts delay.

When grown-ups say it

Traffic Policing
The rule that drops overflow right away. Accepts loss in exchange for instant handling.
Traffic Shaping
The rule that queues overflow in line. Accepts delay to reduce loss.
Burst
The sudden pile of packages arriving at once. A short spike in traffic volume.
Buffer/Queue
The waiting line where packages are stacked. The storage shaping relies on.
QoS
Giving different counters different treatment. The broader framework these rules serve.
L4 Switch
The sorter who checks the counter number too. It manages flow too, by spreading traffic across counters. → the sorter who checks the port
5G Network Slicing
The bigger tech that splits the lane itself. This rule applies once that lane exists. → the network with a lane for every need
Backpressure
Telling the sender upstream to slow down when the counter is too full. A related idea covered in another field (SRE).
Next story
Splitting the Town Into Smaller Zip-Code Zones →
Want another term as a picture book? Request →