Meta has introduced ZGateway, a new stateless proxy layer designed to optimize the interaction between client applications and ZippyDB, the company's primary key-value store. ZippyDB is crucial for managing product metadata and configurations, processing billions of operations each second. Originally developed to address connection issues across a vast network of client hosts, ZGateway has evolved to include features like batching, admission control, caching, and failover management.
Previously, each ZippyDB client connected directly to multiple database hosts, leading to an overwhelming number of TLS connections and significant resource consumption. This setup resulted in connection storms and system crashes. ZGateway now acts as an intermediary, efficiently managing these connections and significantly reducing the load on both clients and database hosts.
With the capability to handle over 1 billion operations per second, ZGateway currently manages around 40% of ZippyDB's traffic, with expectations to increase this share. It operates through regional tiers and offers both proxy and caching functionalities. The system efficiently batches requests and maintains performance metrics, ensuring optimal operation and resource utilization.
