TCP performance
Shaping and policing
Two ways to hold traffic to a rate: a shaper queues the excess, a policer drops it.
Both measure traffic against a token bucket: a rate plus an allowed burst. A shaper delays what exceeds it, so TCP sees a slower path and loses nothing. A policer drops the excess at once, so TCP halves its window, resends, and runs in a saw-tooth. Policing needs no queue, so providers police what enters their network; shaping suits traffic you send, and shaping just under a line's rate moves the queue to a router that can prioritise. The price of each shows on other packets: a shaper's queue adds delay to everything behind it, a policer adds none but loss. Facing a provider's policer, shape a little under its rate so nothing reaches it to be dropped.