Optimizing TCP in Today’s 
Changing Network Environment 
Bart Salaets, Solution Architect, F5 Networks 
September 2014
Agenda 
• Market Trends – Network and Content Optimization 
• TCP Technology Review 
• TCP Optimization in Mobile Networks 
• Test Results 
• Summary 
© F5 Networks, Inc 2
A Changing Environment 
SSL / SPDY INCREASE 
• In Europe, SSL traffic (HTTPS and SPDY) on mobile networks is 
currently reaching around 50% of total Internet traffic 
• Top web sites such as Google, Facebook, and Twitter use SPDY 
• HTTP 2.0 being standardized in IETF with browsers requiring TLS 
encryption when setting up HTTP 2.0 connections 
RISE OF ADAPTIVE BIT RATE VIDEO STREAMING 
• Top video sites such as YouTube, Netflix, Hulu, and BBC iPlayer 
have all embraced ABR video technology 
• Video is encoded at different bit rates, client dynamically chooses 
or changes appropriate bit rate based on network conditions 
• ABR video can be "optimized" using bandwidth control techniques 
© F5 Networks, Inc 3
SPDY – Load Web Pages Faster 
• HTTP inefficient and outdated 
• HTTP protocol inefficiencies have a negative impact 
on mobile web browsing experience 
• Due to higher latencies in mobile networks 
• SPDY: New app layer protocol developed by 
Google 
• Overcomes inherent inefficiencies with HTTP 
• Improved performance (~ 20-50%) 
• Good for low bandwidth / high latency mobile 
networks 
• Forms the basis for HTTP 2.0 in IETF 
© F5 Networks, Inc 4
Impact on Optimization Technologies 
Transparent 
Caching 
TCP Optimization 
and Bandwidth 
Control 
Video and Web 
Optimization 
Increase of SSL and SPDY 
on the web are reducing the 
benefits of this technology 
Will continue to provide benefits 
to majority of traffic as > 90% of 
all traffic rides on top of TCP 
(including SSL/SPDY) 
Increase of video encryption 
and ABR video are reducing 
the benefits of this technology 
© F5 Networks, Inc 5
TCP Protocol Review 
• TCP is a connection-oriented protocol 
• Client and server must establish a connection before any data can be 
transfered 
• TCP provides reliability 
• Knows that data it sends is correctly received by the other end 
• Acknowledgements confirm delivery of data received by TCP receiver 
• Ack for data sent only after data has reached receiver 
• TCP implements flow control and congestion control 
• Sender can not overwhelm a receiver with data 
• Sender will "back off" when under congestion 
© F5 Networks, Inc 6
Bandwidth-Delay Product – Determining Ideal Window Size 
• Ideal size = Bandwidth * Delay Product (BDP) 
Receiver 
Bandwidth = 1Mbps, RTT = 1 second (BDP = 1M bits) 
100K 
BITS 
100K 
BITS 
100K 
BITS 
• What if window size < BDP ? 
100K 
BITS 
• Inefficiency (wasted bandwidth) 
Sender 
• What if window size > BDP ? 
• Queuing at intermediate routers 
• Increased RTT due to queuing delays 
• Potentially, packet loss 
THE BDP SPECIFIES THE TOTAL AMOUNT OF DATA THE PIPE CAN 
9 
100K 
BITS 
100K 
BITS 
100K 
BITS 
100K 
BITS 
100K 
BITS 
100K 
BITS 
HOLD 
© F5 Networks, Inc 9
TCP Congestion Control Algorithms 
• Loss-based algorithms 
• Reno, New Reno, High-Speed, 
Scalable, BIC, CUBIC 
• Delay-based algorithms 
• Vegas 
• Bandwidth-estimating algorithms 
• Westwood, Westwood+ 
• Hybrid delay/loss algorithms 
• Illinois, Woodside (F5) 
RENO CUBIC 
ILLINOIS 
© F5 Networks, Inc 10
Impact of Latency – Web Page Load Times 
Source: Ilya Grigorik, Google 
© F5 Networks, Inc 11
Impact of Packet Loss – Throughput Degradation 
• TCP designed to probe the network to figure out available capacity 
• TCP slow start is a feature, not a bug 
Avg HTTP 
response 
size 16 kB (3 
round trips) 
In mobile networks packet 
loss does not necessarily 
imply congestion 
Source: Ilya Grigorik, Google 
© F5 Networks, Inc 12
Ideal TCP Stacks Would Result In … 
High Effective Faster Web 
Flow Fairness 
Throughput 
Page Loading 
HOW DO WE ACHIEVE THIS IN 2G, 3G, AND 4G NETWORKS ? 
© F5 Networks, Inc 13
TCP Optimization on Gi LAN Using TCP Proxy 
WITH F5 
PGW/ 
GGSN 
Content 
Server 
Radio 
Access 
Internet 
TCP-SYN 
TCP-SYN/ACK 
TCP-ACK 
TUNE SEND/RECEIVE BUFFERS TO INTERNET 
CHOOSE CONGESTION CONTROL TO INTERNET 
ENABLE S-ACK FOR ALL TCP CONNECTIONS 
ENABLE OTHER TCP OPTIONS 
TCP-SYN 
TCP-SYN/ACK 
TCP-ACK 
Cell-optimized TCP connection 
TUNE SEND/RECEIVE BUFFERS TO RADIO 
CHOOSE CONGESTION CONTROL TO RADIO 
ENABLE RATE PACING TO RADIO 
ENABLE S-ACK FOR ALL TCP CONNECTIONS 
ENABLE LOSS FILTER 
ENABLE OTHER TCP OPTIONS 
TYPICALLY USES 
STANDARD TCP 
SETTINGS OF THE 
OPERATING SYSTEM 
WAN-optimized TCP connection 
© F5 Networks, Inc 14
TCP Optimization Deals with Specifics of Radio Networks 
BDP differences between 
Radio/WAN 
Random packet loss 
Buffer bloat issues 
Mobility and inter-RAT handovers 
TCP buffer tuning and buffer mgmt 
Intelligent congestion control (loss 
filters) 
TCP buffer tuning and TCP rate pacing 
Loss- and delay-based congestion 
control 
© F5 Networks, Inc 15
Traditional Optimization Architecture 
PGW/ 
GGSN 
RTR Internet 
Data Center 
TCP 
Optimization 
Video 
Optimization 
DPI Firewall/CGNAT 
All Port 80 traffic (HTTP only) forwarded 
to optimization platforms 
Transparent 
Caching 
RAN 
Optimization platforms can be 
standalone or consolidated 
© F5 Networks, Inc 16
Next-Generation Optimization Architecture 
Inline TCP optimization with intelligent steering consolidated 
PGW/ 
GGSN 
RTR 
PCRF 
Diameter Gx 
DPI Firewall/CGNAT Internet 
Traffic 
Steering 
Context-aware and policy-driven 
traffic steering and service chaining 
TCP 
Optimization 
Data Center 
Video 
Optimization 
Transparent 
Caching 
CONTEXT-AWARE 
STEERING 
Subscriber 
Device-type 
RAT-type 
Content (Video, URI, ...) 
Congestion 
Content optimization platforms 
© F5 Networks, Inc 17
TCP Test Results – Throughput & Web Page Load Times 
200% 
180% 
160% 
140% 
120% 
100% 
80% 
60% 
40% 
20% 
0% 
3G 4G 
HTTP large 
download 
196% 95% 22% 14% 
Poor coverage Good coverage 
40% 
35% 
30% 
25% 
20% 
15% 
10% 
5% 
0% 
Large download: HTTP page with large images (throughput test) 
Small download: HTTP page with small objects (web page load time test) 
HTTP large 
download 
38% 33% 20% 28% 
Poor coverage Good coverage 
TCP OPTIMIZATION BENEFITS INCREASE UNDER POOR RADIO COVERAGE 
© F5 Networks, Inc 18
HTTPS/SPDY Performance Tests 
1.8 
1.6 
1.4 
1.2 
1 
0.8 
0.6 
0.4 
0.2 
0 
Impact SPDY/Optimizer 
Non-SPDY SPDY Non-SPDY-OPT 
SPDY-OPT 
Series1 1.64 1.46 1.27 1.16 
Page Download Time Seconds 
Ref test: duckduckgo.com (25 samples on 4G) 
35% 
30% 
25% 
20% 
15% 
10% 
5% 
0% 
Impact SPDY/Optimizer 
Non-SPDY SPDY Non-SPDY-OPT 
SPDY-OPT 
Series1 0% 11% 23% 31% 
Gain in Download Time % 
TCP OPTIMIZATION PROVIDES ADDITIONAL BENEFITS ON TOP OF SPDY 
BENEFITS 
© F5 Networks, Inc 19
TCP Optimization Helps Avoid Buffer Bloat 
RTT graphs are based on two file downloads under good 3G coverage 
NON-OPTIMIZED (11 Mbps) 
(up to 2.5 seconds latency) 
OPTIMIZED (11 Mbps) 
(constant 200 ms latency) 
LATENCY MAY NOT DESTROY THROUGHPUT, BUT WILL DEGRADE BROWSING 
EXPERIENCE 
© F5 Networks, Inc 20
TCP Optimization – Summary 
Increases “goodput” on radio network and keeps latency under control 
Works for > 90% of all Internet traffic regardless of encryption or 
encoding 
Lengthens life span of radio infrastructure and enhances user 
experience 
Deployed inline on Gi LAN, optionally consolidated with other L4-7 
functions 
© F5 Networks, Inc 21
Solutions for an Application World.

PLNOG 13: Bart Salaets: Optimising TCP in today’s changing network environment

  • 1.
    Optimizing TCP inToday’s Changing Network Environment Bart Salaets, Solution Architect, F5 Networks September 2014
  • 2.
    Agenda • MarketTrends – Network and Content Optimization • TCP Technology Review • TCP Optimization in Mobile Networks • Test Results • Summary © F5 Networks, Inc 2
  • 3.
    A Changing Environment SSL / SPDY INCREASE • In Europe, SSL traffic (HTTPS and SPDY) on mobile networks is currently reaching around 50% of total Internet traffic • Top web sites such as Google, Facebook, and Twitter use SPDY • HTTP 2.0 being standardized in IETF with browsers requiring TLS encryption when setting up HTTP 2.0 connections RISE OF ADAPTIVE BIT RATE VIDEO STREAMING • Top video sites such as YouTube, Netflix, Hulu, and BBC iPlayer have all embraced ABR video technology • Video is encoded at different bit rates, client dynamically chooses or changes appropriate bit rate based on network conditions • ABR video can be "optimized" using bandwidth control techniques © F5 Networks, Inc 3
  • 4.
    SPDY – LoadWeb Pages Faster • HTTP inefficient and outdated • HTTP protocol inefficiencies have a negative impact on mobile web browsing experience • Due to higher latencies in mobile networks • SPDY: New app layer protocol developed by Google • Overcomes inherent inefficiencies with HTTP • Improved performance (~ 20-50%) • Good for low bandwidth / high latency mobile networks • Forms the basis for HTTP 2.0 in IETF © F5 Networks, Inc 4
  • 5.
    Impact on OptimizationTechnologies Transparent Caching TCP Optimization and Bandwidth Control Video and Web Optimization Increase of SSL and SPDY on the web are reducing the benefits of this technology Will continue to provide benefits to majority of traffic as > 90% of all traffic rides on top of TCP (including SSL/SPDY) Increase of video encryption and ABR video are reducing the benefits of this technology © F5 Networks, Inc 5
  • 6.
    TCP Protocol Review • TCP is a connection-oriented protocol • Client and server must establish a connection before any data can be transfered • TCP provides reliability • Knows that data it sends is correctly received by the other end • Acknowledgements confirm delivery of data received by TCP receiver • Ack for data sent only after data has reached receiver • TCP implements flow control and congestion control • Sender can not overwhelm a receiver with data • Sender will "back off" when under congestion © F5 Networks, Inc 6
  • 7.
    Bandwidth-Delay Product –Determining Ideal Window Size • Ideal size = Bandwidth * Delay Product (BDP) Receiver Bandwidth = 1Mbps, RTT = 1 second (BDP = 1M bits) 100K BITS 100K BITS 100K BITS • What if window size < BDP ? 100K BITS • Inefficiency (wasted bandwidth) Sender • What if window size > BDP ? • Queuing at intermediate routers • Increased RTT due to queuing delays • Potentially, packet loss THE BDP SPECIFIES THE TOTAL AMOUNT OF DATA THE PIPE CAN 9 100K BITS 100K BITS 100K BITS 100K BITS 100K BITS 100K BITS HOLD © F5 Networks, Inc 9
  • 8.
    TCP Congestion ControlAlgorithms • Loss-based algorithms • Reno, New Reno, High-Speed, Scalable, BIC, CUBIC • Delay-based algorithms • Vegas • Bandwidth-estimating algorithms • Westwood, Westwood+ • Hybrid delay/loss algorithms • Illinois, Woodside (F5) RENO CUBIC ILLINOIS © F5 Networks, Inc 10
  • 9.
    Impact of Latency– Web Page Load Times Source: Ilya Grigorik, Google © F5 Networks, Inc 11
  • 10.
    Impact of PacketLoss – Throughput Degradation • TCP designed to probe the network to figure out available capacity • TCP slow start is a feature, not a bug Avg HTTP response size 16 kB (3 round trips) In mobile networks packet loss does not necessarily imply congestion Source: Ilya Grigorik, Google © F5 Networks, Inc 12
  • 11.
    Ideal TCP StacksWould Result In … High Effective Faster Web Flow Fairness Throughput Page Loading HOW DO WE ACHIEVE THIS IN 2G, 3G, AND 4G NETWORKS ? © F5 Networks, Inc 13
  • 12.
    TCP Optimization onGi LAN Using TCP Proxy WITH F5 PGW/ GGSN Content Server Radio Access Internet TCP-SYN TCP-SYN/ACK TCP-ACK TUNE SEND/RECEIVE BUFFERS TO INTERNET CHOOSE CONGESTION CONTROL TO INTERNET ENABLE S-ACK FOR ALL TCP CONNECTIONS ENABLE OTHER TCP OPTIONS TCP-SYN TCP-SYN/ACK TCP-ACK Cell-optimized TCP connection TUNE SEND/RECEIVE BUFFERS TO RADIO CHOOSE CONGESTION CONTROL TO RADIO ENABLE RATE PACING TO RADIO ENABLE S-ACK FOR ALL TCP CONNECTIONS ENABLE LOSS FILTER ENABLE OTHER TCP OPTIONS TYPICALLY USES STANDARD TCP SETTINGS OF THE OPERATING SYSTEM WAN-optimized TCP connection © F5 Networks, Inc 14
  • 13.
    TCP Optimization Dealswith Specifics of Radio Networks BDP differences between Radio/WAN Random packet loss Buffer bloat issues Mobility and inter-RAT handovers TCP buffer tuning and buffer mgmt Intelligent congestion control (loss filters) TCP buffer tuning and TCP rate pacing Loss- and delay-based congestion control © F5 Networks, Inc 15
  • 14.
    Traditional Optimization Architecture PGW/ GGSN RTR Internet Data Center TCP Optimization Video Optimization DPI Firewall/CGNAT All Port 80 traffic (HTTP only) forwarded to optimization platforms Transparent Caching RAN Optimization platforms can be standalone or consolidated © F5 Networks, Inc 16
  • 15.
    Next-Generation Optimization Architecture Inline TCP optimization with intelligent steering consolidated PGW/ GGSN RTR PCRF Diameter Gx DPI Firewall/CGNAT Internet Traffic Steering Context-aware and policy-driven traffic steering and service chaining TCP Optimization Data Center Video Optimization Transparent Caching CONTEXT-AWARE STEERING Subscriber Device-type RAT-type Content (Video, URI, ...) Congestion Content optimization platforms © F5 Networks, Inc 17
  • 16.
    TCP Test Results– Throughput & Web Page Load Times 200% 180% 160% 140% 120% 100% 80% 60% 40% 20% 0% 3G 4G HTTP large download 196% 95% 22% 14% Poor coverage Good coverage 40% 35% 30% 25% 20% 15% 10% 5% 0% Large download: HTTP page with large images (throughput test) Small download: HTTP page with small objects (web page load time test) HTTP large download 38% 33% 20% 28% Poor coverage Good coverage TCP OPTIMIZATION BENEFITS INCREASE UNDER POOR RADIO COVERAGE © F5 Networks, Inc 18
  • 17.
    HTTPS/SPDY Performance Tests 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 Impact SPDY/Optimizer Non-SPDY SPDY Non-SPDY-OPT SPDY-OPT Series1 1.64 1.46 1.27 1.16 Page Download Time Seconds Ref test: duckduckgo.com (25 samples on 4G) 35% 30% 25% 20% 15% 10% 5% 0% Impact SPDY/Optimizer Non-SPDY SPDY Non-SPDY-OPT SPDY-OPT Series1 0% 11% 23% 31% Gain in Download Time % TCP OPTIMIZATION PROVIDES ADDITIONAL BENEFITS ON TOP OF SPDY BENEFITS © F5 Networks, Inc 19
  • 18.
    TCP Optimization HelpsAvoid Buffer Bloat RTT graphs are based on two file downloads under good 3G coverage NON-OPTIMIZED (11 Mbps) (up to 2.5 seconds latency) OPTIMIZED (11 Mbps) (constant 200 ms latency) LATENCY MAY NOT DESTROY THROUGHPUT, BUT WILL DEGRADE BROWSING EXPERIENCE © F5 Networks, Inc 20
  • 19.
    TCP Optimization –Summary Increases “goodput” on radio network and keeps latency under control Works for > 90% of all Internet traffic regardless of encryption or encoding Lengthens life span of radio infrastructure and enhances user experience Deployed inline on Gi LAN, optionally consolidated with other L4-7 functions © F5 Networks, Inc 21
  • 20.
    Solutions for anApplication World.

Editor's Notes

  • #5 Google has tested implementing SPDY on a representative group of 25 of the top 100 internet sites, and observed speed improvements from 27% to 60%. CMU study showed ~50% improvement of the Mean Doc Load Time, which is the time taken for the document object model (DOM) to load completely. Based on measurement of 25 top visited websites. Data and Network Optimization Effect on Web Performance Steven Rosenberg, Surbhi Dangi, Isuru Warnakulasooriya February 10, 2012 CMU-SV-12-001
  • #14 To provide the best subscriber QoE, your ideal TCP stack would do a few things for you. It would promote high goodput so that you are always maximizing the amount of data being pushed through your network that is relevant to your subscriber. The higher your goodput, the faster your subscribers get the information they want. It would minimize buffer bloat so you can reduce congestion before it even starts. Buffer bloat is a sign of far too much traffic on a network that can’t handle it, leading to increased delays of your data being sent to your subscribers. Minimizing buffer bloat means less delay which means faster performance for your subscribers. And finally, it would keep fairness between your flows so no one flow gets dropped. A dropped flow leads to the lowest form of subscriber QoE, thus keeping all flows alive is the best scenario. These three characteristics: high goodput, minimal buffer bloat, and flow fairness, would all work together to optimize your network and your subscribers’ QoE.