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 once.Taking them all in would jam the whole sorting office.
There are two choices for handling the overflow.Policing drops the overflow right away; shaping queues it and sends it in order.
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.
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.
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.
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).