Rate Limiting and Traffic Shaping Flashcards
Traffic Shaping Approaches (3)
Leaky Bucket
(r, T) Traffic Shaping
Token Bucket
Motivation for traffic shaping
- resource control
- ensure flows don’t exceed drain rate
Source Classifications and attributes for each one
Data: regular, bursty, periodic
Audio: continuous, periodic
Video: continuous, bursty, periodic
Sourse Classes
CBR: constant bit rate
VBR: variable bit rate
CBR
constant bit rate: arrives at regular intervals and at regular lengths (audio)
VBR
variable bit rate: like video and data. Arrives at variables intervals and lengths
What is constant bit rate shaped by?
peak rate
What is variable but rate shaped by?
average and peak rate
leaky bucket shaping attributes
beta: size of bucket
row: drain rate of bucket (maximum smooth rate)
Size of bucket controls the burst rate. As long as size of the burst does not exceed size of bucket, sender can send at faster rate.
- smooths bursty traffic
- priority policies for flows that exceed smoothing rate
(r, T) traffic shaping attributes
- traffic divided into T-bit frames
- flow can inject <= r bits in any T-bit frame
- typically used for fixed flows
what is “(r, T) smooth”?
optimal property achieved when (r, T) traffic shaping is implemented
what is policing?
it is process by which packets are given priority assignments by the sender or within the network
token bucket attributes
- row = rate at which tokens are placed in the bucket
- traffic is sent by the regulator as long as there are tokens in the bucket
- permits burstiness, but bounds it
- long term rate < row
- no discard or priority/policing
problem with standard token bucket
lack of policing means that it can monopolize network resources by interfering with other high priority traffic
How to police with a token bucket?
You must use a composite shaper (leaky bucket + token bucket)
Composite shaper attributes
- combination of leaky bucket and token bucket
- more complex because you need 1 counter and 1 timer for each bucket
token bucket shaper max rate calculation
max = beta + (timeInterval * row)
what is power boost?
Technology which allows a subscriber to temporarily send @ higher rate than the sustained rate
2 types of power boost are:
capped and uncapped
- capped uses a second token bucket w/ additional ‘row’; value
- uncapped: power boost window is the bucket size
power boost variables
- sending rate: r
- sustained rate: Rsus
- power boost bucket size: beta
- time: d
power boost bucket formula
beta = d * (r - Rsus)
power boost time formula
d = beta / (r- Rsus)
potential problem and solution to power boost
rate at which data sent during the PB may exceed the access link’s ability to service the packets. So buffer may fill up.
The solution to this is to place a traffic shaper in front of the power boost so that the rate never exceeds Rsus
what is buffer bloat?
In the presence of a network buffer, delay experienced by sender. This is because if buffer is large, sender won’t see dropped packets until the buffer is full, causing delay.
solutions to buffer bloat
- smaller buffers (hard to do since network infrastructure already deployed)
- shaping: ensure sending rate never exceeds the drain rate of the access link
types of network measurement
passive and active
passive: collection of packets, flow states already on network
active: inject additional traffic to measure characteristics (ping, traceroute)
why measure
- billing (95th percentile billing)
- security (compromised hosts, botnets, DOS)
packet delay calculation
data in buffer / Rsus