
当你用手机点餐时,哪怕是在应用内导航所花的时间也是浪费。在 P99 2026 虚拟会议上,总部位于德国的全球外卖服务商 Delivery Hero 的资深工程师 Elvis Chidera 解释了该公司如何将大部分用户群迁移至 HTTP/3,从而将其应用首页的总端到端响应时间缩减了 17%。负责该项目的 Chidera 表示,正如名字所暗示的,HTTP/3 比 HTTP/2 传输网页更快,尽管它也有运行缓慢的环节,需要调整才能正常工作。
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.
在美国鲜为人知的 Delivery Hero,美国市场由 Uber Eats 和 DoorDash 主导。但它是一家在全球(美国除外)拥有广泛业务的公司,估计在欧洲、拉丁美洲、非洲、中东和亚洲拥有 6000 万用户群。Uber 目前正以 148 亿美元收购 Delivery Hero,计划将其与 Uber Eats 合并。通过这笔收购,Uber 将扩大同时提供网约车和外卖服务的市场数量,尽管不一定都使用 Uber Eats 品牌。
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 集中管理面向不同地区的独立应用,这些应用均为其自建或收购。亚洲用户可通过 Foodpanda 订购波奇饭和日用品。土耳其用户可通过 Yemeksepeti 订购烤肉。在西班牙、意大利、波兰、罗马尼亚、乌克兰以及非洲大部分地区,Glovo 应用是深夜外卖的首选。而在拉丁美洲,用户则通过 PedidosYa 从附近的药店、餐馆和市场获取所需商品。
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.
所有这些地区的网络连接状况差异巨大,这是 Delivery Hero 想要尽量减少的问题。最后一公里网络最常成为瓶颈。例如,巴基斯坦的应用建立与服务器的安全握手可能需要近一秒时间(p90 百分位)。工程团队将 HTTP/3 视为降低甚至消除该延迟的一种途径。
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.
更快的 HTTP 互联网工程任务组(IETF)于 2022 年正式推出了互联网超文本传输协议的第三个版本。HTTP 是连接浏览器与其他连接到服务器的资源的应用层协议。之前的 HTTP 版本构建在传输控制协议(TCP)之上,后者提供可靠交付和流量控制。TCP 与互联网协议(IP)结合,构建了现代互联网。HTTP/3 用由 Google 开发的快速 UDP 互联网连接(QUIC)取代了 TCP,以解决 TCP 作为传输协议被认为存在的迟缓问题。
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 代表用户数据报协议,与 TCP 不同,它不保证数据包交付或流量控制。UDP 更快,因为它不需要等待确认签名(QUIC 在 UDP 之上增加了自己的流量控制)。但基于 UDP 的 HTTP/3 减少了保护连接所需的往返次数,有时甚至能完全消除。应用程序可以缓存会话票据,并在后续连接中利用 QUIC 的 0-RTT(零往返时间)能力,在握手仍在进行时就开始发送符合条件的应用数据,而不必等待握手完成。
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.
“本质上,你可以消除那一秒钟”困扰较慢网络的延迟,Chidera 说。“如果能更快地交换数据,你不想为了交换数据而付出两次往返的代价。”而且与 HTTP/2 不同,当数据包丢失或延迟时,HTTP/3 不会卡住。因为数据包是在多条流中发送,而不是仅像 HTTP/2 那样在单一串行中发送,所以不存在队头阻塞。
“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.
初始化期间的多任务处理 Chidera 发现,设置 HTTP/3 出奇地简单。Delivery Hero 使用 Cloudflare 的内容分发网络为其全球用户群提供服务,因此迁移到 HTTP/3 只需简单的重新配置。为客户端(主要是移动端)添加 HTTP/3 支持几乎同样简单。
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.
苹果自iOS 15起便支持HTTP/3,大多数原生浏览器也已开箱即用地支持HTTP/3。安卓这边则稍显棘手。工程师们采用谷歌的Cronet库作为网络栈,最初通过Cronet Transport for OkHttp封装器接入其安卓应用,以尽量减少对原本为OkHttp HTTP客户端编写的现有代码的改写。开箱即用的情况下,Cronet帮助支撑了HTTP/3的推广,减少了网络层面的请求失败。
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.
但它也带来一个明显的代价:该引擎在P90分位下初始化耗时约800毫秒,侵蚀了HTTP/3部分0-RTT速度优势。于是团队将代码分叉,用一款名为OKCronet的库构建了自己的桥接层。他们还做了一些额外的工程工作,包括将Cronet初始化与其他后台任务重叠进行。总体而言,他们将P95延迟从1.2秒削减至120毫秒,实现了读取延迟10倍的提升。
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.
明智地选择拥塞控制算法总体而言,工程团队已将95%的用户迁移至HTTP/3。那些无法使用该协议的设备(主要因网络封锁UDP流量)会自动回退到HTTP/2。应用与服务器之间的握手延迟降低了51%。巴基斯坦的响应时间缩短了一半。然而仍有一个障碍。部分应用中的次级页面(非首页的页面/屏幕)出现了延迟问题。这些问题只发生在已知易受丢包影响的某些市场,例如巴基斯坦。
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的工程师将问题归因于Cloudflare为HTTP/3选择的拥塞控制算法Cubic,该算法历来对丢包处理不佳。工程团队用谷歌支持HTTP/3的服务器测试了部分流量,这些服务器使用另一种拥塞协议——瓶颈带宽与往返传播时间(BBR),并未因丢包而卡顿。
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目前正与Cloudflare合作,以解决这一特定的拥塞算法问题,Chidera表示。有时候,尽管竭尽全力,那份新鲜美味的拉赫马俊就是无法尽可能快地送到你家门口。®
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. ®