Meta Introduces ZGateway: A Stateless Proxy Tier That Unifies ZippyDB Traffic and Handles Over 1 Billion Operations Per Second

2026年9月15日 04:28
站內 AI 整理稿

Meta engineering team introduced ZGateway, a proxy tier that now sits between client applications and ZippyDB, the Meta’s most widely used key value store.ZippyDB backs product metadata, counters, and configuration at billions of operations per second.

ZGateway started as a fix for connection sprawl across more than a million client hosts and grew into the home for batching, admission control, caching, and failover.Why ZippyDB Needed a Proxy Under direct access, every ZippyDB client connected to every database host it needed.

A single client could touch tens of thousands of shards across hundreds of thousands of hosts, so both a typical client and a typical database host carried tens of thousands of TLS connections.

Each idle connection consumed memory, CPU, and a file descriptor on both ends, and inbound counts grew with every client cohort.

Reconnection storms caused crashes from file descriptor exhaustion and OOMs; in one incident a routing bug made every client open a connection per shard and the fleet fell into a reboot loop.Client-side fixes were impractical because hundreds of teams own the client fleet.

What is ZGateway ZGateway is a stateless proxy tier between ZippyDB clients and the ZServer database fleet.Per Meta, it handles more than 1 billion operations per second and carries about 40% of ZippyDB traffic, projected to pass 60%, at about 6% computational overhead for an average use case.

It runs as regional tiers discovered through ServiceRouter, Meta’s service mesh, in two flavors: a pure proxy and a read-through cache.The engine is Meta’s thick C++ ZippyDB client, so ZGateway is effectively a ZippyDB client run as a managed service.

A client sends requests over a sticky connection to a regional ZGateway host, which terminates TLS, authorizes against the use case’s ACLs, applies per-tenant admission control and shaping, resolves the shard, checks the local cache on caching tiers, batches the request with other in-flight work for that shard, and forwards it to the correct replicas.

Responses are demultiplexed back with per-use-case metrics, traces, and quota usage recorded.TLS stays in the Thrift/ServiceRouter stack and replica selection stays in the embedded client.

The Fan-In and Fan-Out Math Meta models the fleet as balls thrown into bins: with B shards and H hosts, a host is hit with probability E(H,B)=H(1−e−B/h)E(H,B) = H\left(1 – e^{-B/h}\right).

With mock figures of 20 regions, 500,000 database hosts, 30,000 proxy hosts, 1,000,000 clients, and 50,000 shards per client, per-host connection counts collapse by roughly 97 to 98% and total persistent connections drop about 19x.

The deeper win is scaling: direct-access fan-in grows linearly with clients, while ZGateway fan-in reduces to roughly regions times shard density per host, independent of both fleets.

Capabilities That Followed Safe migration: Configuration flags scoped per service and shard prefix provide a percentage ramp, a region filter, and a global kill switch.

Discriminant Load Shedding (DLS): Requests map to per-tenant buckets split by priority that drain round-robin, so a flooding tenant only fills its own bucket.In a controlled overload above 90% CPU across roughly 1,350 tenant buckets, only 6 noisy neighbors shed load, the rest executed 99.

9% of requests with zero rejections, goodput held near 97 to 98%, and the machinery cost about 8% of CPU.Read caching: Cache tiers serve hot reads in-process, take a per-key fill lock on misses, and stay fresh via change-data-capture events under a bounded-staleness contract.

Load balancing: Tiers mix roughly 26-core to 126-core hosts, so a control-plane balancer nudges each host’s ServiceRouter weight opposite to its recent CPU load.Cross-region resilience: Global routing, mega-regions, and rings let a saturated regional tier fail over to healthy capacity nearby.

Transactions: Client-side bookkeeping moved into the gateway, consolidated in nine phases to 100% of transaction traffic with no reliability regression.window.addEventListener("message",function(e){if(e.data&&e.data.mtpZgHeight){var f=document.getElementById("mtp-zg-frame");if(f)f.style.height=e.

data.mtpZgHeight+"px";}}); Key Takeaways ZGateway handles over 1B ops/sec and carries about 40% of ZippyDB traffic at roughly 6% overhead.The proxy turns database fan-in from linear in client count into a bounded number Meta controls.

Cross-client batching and coalescing kill hot-key stampedes and retired fragile client libraries.DLS isolated 6 noisy tenants out of about 1,350 under 90%+ CPU with 97 to 98% goodput.Not deployable outside Meta; the value is in the patterns, not a package.

Check out the Meta Engineering blog post and the X announcement.All credit goes to the researcher of this project.Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter.Wait!are you on telegram?now you can join us on telegram as well.

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.?Connect with us The post Meta Introduces ZGateway: A Stateless Proxy Tier That Unifies ZippyDB Traffic and Handles Over 1 Billion Operations Per Second appeared first on MarkTechPost.

Related

相關文章

蘋果Apple Watch迎來Audio Intelligence,對話摘要與實時倒帶功能開啟Beta測試

四大核心功能:覆蓋聲音識別、歌曲辨識與智能摘要本次上線的 Audio Intelligence 包含四項完全由用戶自主選擇開啟的 AI 功能,旨在全方位拓展智能手錶在聲音感知和日常生活場景中的實用價值:聲音識別(Sound Recognition): 該功能專為聽障或聽力受損用戶設計,能夠通過手錶實時偵測並識別周圍環境中的重要聲音,例如警笛聲、火警警報或門鈴聲。

4 小時前7700

螞蟻阿福獲世界互聯網大會領先科技獎 成為首個獲得該獎的健康AI應用

目前,螞蟻阿福已服務1.5億用戶,單日解答近2000萬人次的健康諮詢,是全球第一大健康管理AI App。首都醫科大學公共衛生學院教授張玲認為,螞蟻阿福為代表的健康AI快速發展,符合大眾日益增長的健康需求,是“健康中國”與“人工智能+”行動落地的最佳實踐,對提高群眾看病就醫便利度、夯實全民健康根基發揮著積極作用。

1 天前4400

Telesin泰迅 大師影像套裝再度入駐 Apple 授權專營店 全國上架門店超 3000 家

近日,Telesin泰迅 公佈,適配 iPhone 18 Pro / Pro Max 的大師影像套裝·經典系列已在全國 3000 餘家 Apple 授權專營店上架。Telesin泰迅大師影像套裝已連續兩年進入 Apple 授權零售渠道,為消費者提供瞭解、體驗和選購手機影像配件的線下入口。此次上架的經典系列以攝影手柄為基礎,配合可選外接鏡頭及遮光罩等配件,圍繞手機拍攝中的握持、操控與遠攝需求展開。消費者在選購 iPhone 的同時,也能近距離了解適配的影像配件,根據人像、旅行或演唱會等拍攝需求選擇產品組合。

1 天前

從“自己滾”到“自動滾” ,雲望創新第二代自動泡沫軸亮相 INNO100

2026年10月31日,雲望創新(RheoFit)攜第二代全自動泡沫軸 A1 Lite,亮相在廣東深圳 INNO100 全球創新旗艦店舉行的“INNO100 首「硬」禮”活動。活動現場,雲望創新創始人孫英東、市場總監徐子微、產品經理李沐璘分享品牌理念、產品設計及日常運動恢復體驗。雲望創新創始人孫英東介紹,作為全球首款全自動泡沫軸的開創者,雲望創新(RheoFit)通過初代產品 雲望A1,將“躺下就能放鬆”的體驗帶入運動恢復場景。目前,A1 已遠銷全球 20 多個國家和地區。

1 天前

騰訊燈塔AI正式對外開放:十年內部錘鍊,一句話完成數據分析

騰訊燈塔過去十年專注於騰訊內部業務的自助分析洞察與數據可視化,此次品牌升級為AI數據分析洞察套件,面向業務團隊提供自然語言問數、看板生成、歸因分析、指標監控與團隊協作等一站式能力。經過十多年技術積累和產品迭代,如今新升級的燈塔AI已廣泛應用於 QQ、騰訊視頻、騰訊新聞、應用寶、微信支付、元寶、騰訊客服、天美遊戲等100多個騰訊內部業務團隊,積累了豐富的數據分析,日常經營分析經驗。

5 天前6500