Rate limiting and traffic shaping Flashcards
data classification (traffic)
Bursty, Periodic, regular
audio classification (traffic
continuous, periodic
video classification (traffic)
continuous, periodic, bursty
Two rate classes
CBR and VBR
CBR
Constant Bit Rate source (audio)
VBR
Variable Bit Rate source (video, audio)
How is CBR shaped
Peak Rate
How is VBR shaped
Average and peak rate
leaky bucket shaper
you have a buffer Beta that can be thought of as having a leaky whole. Rho is the drain rate that acts as a regulator.
(R, T) packet shaping
Traffic is divided into T-bit frames
Flow can inject <= r bits in any T-bit frame
What to do when a flow exceeds rate? (leaky bucket)
Packets are given a lower priority or in the worse case dropped
What is used to shape bursty traffic?
Token Bucket
What is a token bucket
we have a rate rho at which tokens are placed in the bucket. Lambda(peak) = peak rate. Lambda(avg) = average rate.
What happens when the token bucket is full?
If we are sending a packet of size b: if bucket is full, packet is sent, b tokens removed.
What happens when the token bucket is empty
Empty pack must wait until b tokens arrive.
What happens when the token bucket is partially full?
If number of tokens exceeds b send otherwise wait
Token Bucket main points
Permits burst but bounds it. If any T, rate < Beta + T * rho, longterm < rho, no discard or priority, difficult to policy
Leaky Bucket main points
Forces to be smooth, Priority policy