7 - Rate Limiting and Traffic Shaping Flashcards
Data Traffic Classifications
Bursty, periodic, and regular
Audio Traffic Classifications
Continuous, and Periodic
Video Traffic Classifications
Continuous, bursty, and periodic
Two kinds of traffic
Constant Bit Rate Source (CBR) Variable Bit Rate Source (VBR)
CBR
Constant Bit Rate Source - Examples are Audio - Shaped according to a peak rate
VBR
Variable Bit Rate source - Examples are Video and Data - Shaped according to average and peak rate where average rate is small fraction of peak rate

VBR

CBR
Leaky Bucket
Each flow has own bucket
Beta = size of bucket
Rho = drain rate of bucket (“regulator”)
Accomodates different burst rates by ensuing the packets are always delivered at a constant rate Rho.

(r, t) Traffic Shaping
Traffic divided into T-bit frames.
Flow can inject <= r bits into any T-bit frame
If a sender wants to send more than r bits, it needs to wait until next T-bit frame
Known as (r,t) smooth traffic shaping
Limited to fixed rate flows
(r, t) Traffic Shaping compared to Leaky Bucket
(r, t) Traffic shaping is slightly relaxed compared to Leaky Bucket. In (r,t) rather than sending a packet every time unit like Leaky BUcket, a sender can send a certain number of bits every time unit.
What happens if a flow exceeds a rate?
Excess packets in flow are given lower priority or preferentially dropped
Where are packet priorities set?
Sender or Network
Sender - App may mark own packets as it knows which are most important
Network - Marks some packets lower priority called “policing”
Token Bucket
For shaping bursty traffic but still ensure flow does not exceed average rate
Rho - Rate tokens arrive in bucket
Beta - Capacity of bucket
Traffic can arrive at rates lambda avg or lambda peak
Need to wait until there are b tokens in the bucket before sending

Token Bucket vs Leaky Bucket
Leaky bucket:
Parameters: rate
1. Smooth out traffic by passing packets only when there is a token. Does not permit burstiness.
2. Discards packets for which no tokens are available (no concept of queue)
3. Application: Traffic shaping or traffic policing.
Token bucket:
Params: rate, burstiness.
1. Token bucket smooths traffic too but permits burstiness - which is equivalent to the number of tokens accumulated in the bucket.
2. Discards tokens when bucket is full, but never discards packets (infinite queue).
3. Application: Network traffic shaping or rate limiting.
- Difficult to police traffic flow. Need to limit how long a sender can monopolize network
Composite Shaper
Used to apply policing to token bucket
Combines token and leaky bucket
Confirming that flow data rate does not exceed rate allowed by smoothed leaky bucket
More complex, requies 2 timers and 1 counter for each bucket
Token Buffer Shaper
Beta = 100KB
Rho = 10 packets/sec
T interval =1 sec
Packet Size = 1KB
(Flow <= B + T * r data in any interval)
Max Rate in Kb?
B + (T * r)
Max Rate = 100KB + 10KB/s(1 sec) = 100KB + 10KB = 110KB = 880 kbs
Power Boost
First Deployed June 2006 Comcast
Allows subscriber to send at higher rate for brief period of time
Targets spare capacity for those that don’t put sustained load on network
Can be capped or uncapped
Calculating Powerboost Rates
R(sustained) = 10Mbps
r(boost) 15Mbps
B = 1 Mbyte
How long can sender send at r (solve for d)?
d = B /(r - Rsus)
d = 1Mbyte/(15Mbps-10Mbs) =8Mbits/5Mbs=1.6 seconds

Power Boost and Latency
Users may experience high latency and loss due to power boost
Reason is access link may not be able to support higher rate
Buffers will fill up and introduce delays because difference in rate between boost and access link rate
How to solve Power Boost Latency
Send should limit sending rate to that of the access link (sustained rate)
Buffer Bloat
Example is latency effect of power boost
Issue is buffer is filled up by temporary boost rate.
This increases latency due to waiting for buffer to drain at slower rate
Buffer Bloat Solutions
- Smaller Buffers
- Shaping Traffic in router to match uplink rate
Two Types of Network Measurment
Passive Measurement: Measuring packets and flows already on network
Active Measurment: Inject additional traffic and measure characteristics (ping or trace route)