Article 79DTK HTTP/3 is faster with some work and help from Cloudflare

HTTP/3 is faster with some work and help from Cloudflare

by
Joab Jackson
from www.theregister.com - Articles on (#79DTK)
Story Image

When you're ordering food from your phone, even time spent navigating the app is time wasted. At the P99 2026 virtual conference, Elvis Chidera, a staff engineer at Germany-based global delivery service Delivery Hero, explained how the company moved most of its user base to HTTP/3, and consequently cut its apps' total end-to-end response time of the home screen by 17 percent.

Chidera, who managed the project, explained that, as promised on the tin, HTTP/3 delivers the web faster than HTTP/2, though it has slow bits that need to be adjusted to work properly.

Uber eats Delivery Hero

Delivery Hero is all but unknown in the US, which is dominated by Uber Eats and DoorDash. But it is a company with global reach outside the US, with an estimated user base of 60 million across Europe, Latin America, Africa, the Middle East, and Asia. Uber is currently acquiring Delivery Hero for $14.8 billion, with plans to unite the company with Uber Eats.

With this purchase, Uber would expand the number of markets where it offers both ride-hailing and delivery services, though not necessarily under the Uber Eats nameplate. Delivery Hero centrally manages separate apps for different regions, all of which it built or acquired. Asians can order poke bowls and sundries through Foodpanda. Turks can order kebabs through Yemeksepeti. Throughout Spain, Italy, Poland, Romania, Ukraine, and much of Africa, the Glovo app is where to ring up the late-night deliveries. And in Latin America, users dial in to PedidosYa to get what they need from nearby farmacias, restaurantes, and mercados.

All these regions have widely varying network connectivity, a problem Delivery Hero wanted to minimize.

Last mile networking was most often the bottleneck. Apps in Pakistan, for instance, could take nearly a second (at p90) to establish a secure handshake with a server. The engineering team looked at HTTP/3 as a way to lower, even eliminate, that latency.

A QUIC-er HTTP

The Internet Engineering Task Force (IETF) formally introduced the third version of the internet's Hypertext Transfer Protocol in 2022. HTTP is the application layer protocol that connects browsers and other resources connected to servers over the Internet.

The previous versions of HTTP were built on the Transmission Control Protocol (TCP), which offered guaranteed delivery and flow control. In conjunction with the Internet Protocol (IP), TCP/IP built the modern internet.

HTTP/3 replaced TCP with Quick UDP Internet Connection (QUIC), developed by Google, to address some of TCP's perceived sluggishness as a transfer protocol.

UDP stands for User Datagram Protocol and, unlike TCP, it does not guarantee packet delivery or flow control. UDP is faster because it doesn't wait around for a signature (QUIC adds in its own flow control on top of UDP).

But the UDP-based HTTP/3 reduces, and sometimes eliminates, the round trips needed to secure connections. The app can cache a session ticket and, on a later connection, use QUIC's 0-RTT capability to start sending eligible application data while the handshake is still underway, rather than waiting for it to finish.

Essentially, you can eliminate that one second" of latency that plagued slower networks, Chidera said. You don't want to pay the cost of two round trips just to exchange data, if you could do it faster."

And unlike HTTP/2, HTTP/3 doesn't get hung up when packets are lost or delayed. There's no head-of-line blocking because packets are sent in multiple streams, not just the single string that HTTP/2 offers.

Multitask during initialization

Setting up HTTP/3 turned out to be surprisingly easy, Chidera found. Delivery Hero used Cloudflare's content delivery network to serve its global user base, so moving to HTTP/3 involved a simple reconfiguration.

Adding HTTP/3 support to the clients, mostly mobile, proved almost as straightforward. Apple has supported HTTP/3 since iOS 15 and most native browsers already support HTTP/3 out of the box.

Android proved a bit trickier. The engineers used Google's Cronet library for the networking stack, initially wired into their Android apps with the Cronet Transport for OkHttp wrapper to minimize rewriting their existing code, originally written for the OkHttp HTTP client.

Out of the box, Cronet helped support the HTTP/3 rollout, which reduced network-level request failures. But it also came with a significant catch: the engine took approximately 800 milliseconds to initialize at P90, eating into some of HTTP/3's 0-RTT speed benefits. So the team forked the code into their own bridge using a library called OKCronet. They also did some additional engineering work, which involved overlapping Cronet initialization with other background tasks.

Overall, they slashed the P95 latency time from 1.2 seconds to 120 milliseconds, achieving a 10x improvement in read latency.

Choose your congestion control algo wisely

Overall, the engineering team moved 95 percent of the users over to HTTP/3. Those devices that couldn't use the protocol (largely due to networks blocking UDP traffic) automatically fell back to HTTP/2. Handshake latency between the apps and the server was cut by 51 percent. Pakistan's response time was cut in half.

One hurdle remained, however. Secondary screens on some of the apps (pages/screens that aren't the home page) experienced latency issues. These issues only happened in certain markets that were known to be prone to packet loss, such as Pakistan.

Delivery Hero's engineers attributed the issue to Cloudflare's choice of the congestion control algorithm for HTTP/3, Cubic, which historically has not handled packet loss well. The engineering team tested some of its traffic with Google HTTP/3-aware servers, which use another congestion protocol, Bottleneck Bandwidth and Round-trip propagation time (BBR), and did not get hung up on the packet loss.

Delivery Hero is currently working with Cloudflare to resolve this specific congestion algorithm issue, Chidera said.

Sometimes that fresh, delicious lahmacun just won't get to your door as fast as it possibly can, despite all best efforts. (R)

External Content
Source RSS or Atom Feed
Feed Location http://www.theregister.co.uk/headlines.atom
Feed Title www.theregister.com - Articles
Feed Link https://www.theregister.com/
Reply 0 comments