Subscribe to receive notifications of new posts:

Mobile Web Performance: Optimizing TCP Congestion Control Algorithms

2012-06-12

2 min read
Mobile Web Performance: Optimizing TCP Congestion Control Algorithms

Transmission Control Protocol (TCP) is one of the primary protocols of the Internet. When you request a web page, the server responds with the data that makes up that page. The data is subdivided into discrete packets of data as they are sent across the Internet from the server back to your browser.

The size of these packets and the number of packets in flight can be dynamic and adjusted based on what is known as the Congestion Control Algorithm. While the late United States Senator Ted Stevens got a lot of flack for saying it, the Internet really is akin to a series of tubes. Sometimes these tubes fill up (i.e., a network port fills to its maximum capacity). When that happens, the network is said to be congested and some packets can be lost. It's a lot like a virtual traffic jam.

Traditional Congestion Control

To minimize the impact of congestion, the TCP Congestion Control Algorithm on servers adjust the size of the packets and also the number of packets that are "in-flight" across the network (known as the Congestion Window) depending on whether loss is detected. Historically, loss was most common because some network link would be over saturated. The default algorithms in most OS kernels rapidly shrinks the size of the congestion window at the first sign of loss and then slowly ramp it back up as the loss on the network diminishes.

Mobile Changes Everything

The problem is that congestion on the web today doesn't always occur in the same way that it did when TCP algorithms were first conceived. Mobile, specifically, is radically changing congestion behavior. We've all experienced it. Walking from one side of a room to the other can cause a change in mobile data performance. While in the past congestion indicated an over-saturated network link, today congestion could be the result of something extremely temporary like someone turning on a microwave.

The problem is that the default response to congestion, which assumes a longer-term, latent problem, ends up often being the wrong response in a world where congestion can be random and sporadic. In other words, you need a modern Congestion Control Algorithm that is tuned to take into account the behavior of both traditional wire-line network transactions as well as new wireless connections.

Better Congestion Control From Real Network Data

CloudFlare sits in a unique position to monitor and understand the behavior of the world's networks. We receive traffic every day from virtually all the world's Internet service providers. For the last year, we have been mapping how networks handle TCP. We know, for example, that an Indian wireless provider experiences higher levels of packet loss at noon in Mumbai, when the sun is directly overhead and data usage is at its peak, than at midnight.

We've begun to use this data to tune our own TCP Congestion Control Algorithm to be responsive based on the characteristics of the networks we see. Today we rolled out an update that already appears to have improved performance on mobile networks that experience high loss rates significantly. Going forward, we'll be adjusting our tuning on a per-network basis to optimize performance for our customers' sites based on the actual characteristics of each network.

Mobile Web Performance: Optimizing TCP Congestion Control
Algorithms

Core to CloudFlare's value proposition is that our network gets smarter as it grows larger. That is easy to understand with regard to security (i.e., if one site is attacked, information about that attack is used to protect other sites on the network). It turns out that same benefit also applies to performance. By understanding the characteristics of the network for hundreds of thousands of sites, we're able to continually tune our network to provide the best possible performance.

CloudFlare's mission is to build a better Internet, and that involves tuning all the way down to the underlying protocols that serve as its foundation. Stay tuned. A lot more along these lines is yet to come.

Cloudflare's connectivity cloud protects entire corporate networks, helps customers build Internet-scale applications efficiently, accelerates any website or Internet application, wards off DDoS attacks, keeps hackers at bay, and can help you on your journey to Zero Trust.

Visit 1.1.1.1 from any device to get started with our free app that makes your Internet faster and safer.

To learn more about our mission to help build a better Internet, start here. If you're looking for a new career direction, check out our open positions.
MobileNetworkSpeed & ReliabilityTCP

Follow on X

Matthew Prince|@eastdakota
Cloudflare|@cloudflare

Related posts

October 09, 2024 1:00 PM

Improving platform resilience at Cloudflare through automation

We realized that we need a way to automatically heal our platform from an operations perspective, and designed and built a workflow orchestration platform to provide these self-healing capabilities across our global network. We explore how this has helped us to reduce the impact on our customers due to operational issues, and the rich variety of similar problems it has empowered us to solve....

September 25, 2024 1:00 PM

Introducing Speed Brain: helping web pages load 45% faster

We are excited to announce the latest leap forward in speed – Speed Brain. Speed Brain uses the Speculation Rules API to prefetch content for the user's likely next navigations. The goal is to download a web page to the browser before a user navigates to it, allowing pages to load instantly. ...