Meta
Meta logoMeta · Feature trail

Internet Latency and Network Performance Analysis

120 posts · Aug 2008 – Oct 2026

What this trail covers

Meta's efforts to optimize internet latency and network performance have evolved significantly, encompassing advancements in data center distribution, edge network scaling, and content delivery. This includes the development and deployment of new transport protocols like QUIC and HTTP/3, which have demonstrated substantial improvements in request error rates, tail latency, and overall user experience across Meta's family of apps, including Facebook and Instagram. The company actively develops and deploys Network Time Security (NTS) to authenticate time synchronization, ensuring the integrity of time-based security decisions like certificate validation and token expiry. NTS addresses the inherent lack of authentication in NTP by using TLS 1.3 for key establishment and authenticated NTP packets with extension fields, preventing man-in-the-middle attacks that could manipulate system clocks to bypass security measures or cause widespread service disruptions. Meta has open-sourced its NTS implementation, including the protocol, server, and client library, to encourage wider adoption and improve the security posture of internet-connected devices.

All Meta trails
  1. ZGateway: Learnings from Putting a Proxy in Front of ZippyDBThis post introduces ZGateway, a new proxy layer designed to manage traffic for ZippyDB, Meta's widely-used key-value store. ZGateway addresses the challenges of a sprawling ZippyDB client fleet by acting as a unified entry point. Key technical contributions include: 1. **Connection Management:** ZGateway collapses the many-to-many mesh of TLS connections between clients and database hosts into bounded connections at the proxy tier, significantly reducing resource consumption and improving reliability by containing reconnection storms. 2. **Request Batching and Coalescing:** ZGateway groups requests from multiple clients destined for the same shard into single backend RPCs, amortizing fixed overheads, reducing QPS, and smoothing load. It also coalesces requests for hot keys, preventing stampedes against replicas. 3. **Traffic Routing and Migration:** ZGateway enables incremental and reversible migration of traffic via client-side configuration flags, allowing for controlled rollouts and rollbacks. 4. **Tenant Isolation and Admission Control:** The proxy tier enforces per-tenant admission control, validation, and shaping, preventing misbehaving tenants from impacting others. 5. **Read-Through Cache:** A caching tier is integrated to serve read requests directly, further improving performance. The post details the arithmetic behind fan-in/fan-out reduction and the safety mechanisms for in-memory batching (idle eviction, in-flight caps).
  2. How Meta animates AI-generated images at scaleThis post details optimizations for Meta AI's image animation feature, focusing on reducing inference latency and improving scalability. Key technical contributions include: halving floating-point precision from float32 to float16 (bfloat16) to reduce memory footprint and speed up operations; optimizing temporal-attention expansion by performing it after cross-attention's linear projection layers to reduce compute and memory; leveraging DPM-Solver with a linear-in-log signal-to-noise time to reduce sampling steps to 15; combining guidance and step distillation to reduce three forward passes per step to one, and distilling 32 teacher steps into eight student steps with one forward pass per step; and applying PyTorch optimizations like TorchScripting (continuous folding, fusing operations, reducing computational graph complexity) and freezing, later migrating to PyTorch 2.0 for more granular component optimization and multi-GPU inference. For large-scale deployment, a regional traffic management system was implemented to keep requests in the same region as their requester, minimizing network overhead. This system dynamically calculates routing tables based on load data, predefined thresholds, and routing rings to offload traffic to nearby regions when nearing capacity. To address dips in success rate due to GPUs being saturated, a probing system approximating retries was used to quickly check for free GPUs and prevent failures, with optimized retry settings for the router.