Traffic shaping

Traffic shaping provides a mechanism to control the volume of traffic being sent into a network (bandwidth throttling), and the rate at which the traffic is being sent (rate limiting). Two predominant methods for shaping traffic exist: a leaky bucket implementation and a token bucket implementation. Both these schemes have distinctly different properties and are used for distinctly different purposes. In computer networking, traffic shaping works by debursting traffic flows, e.g. smoothing the peaks and troughs of data transmission.
Traffic shaping is an attempt to control computer network traffic in order to optimize or guarantee performance, low latency, and/or bandwidth. Traffic shaping deals with concepts of classification, queue disciplines, enforcing policies, congestion management, quality of service (QoS), and fairness. It also may be necessary to identify traffic flows at the ingress point (the point at which traffic enters the network) with a granularity that allows the traffic-shaping control mechanism to separate traffic into individual flows and shape them differently. For this reason, traffic shaping schemes need to be implemented at the network edges to control the traffic entering the network.