Meituan Naming Service (MNS) 2.0: Architecture Evolution and Business Enablement
Meituan’s Naming Service 2.0 replaces the ZooKeeper‑based 1.0 design with a four‑layer, AP‑oriented architecture that leverages a service‑mesh sidecar, sharded KV storage, and a control service layer, delivering eight‑fold throughput gains, sub‑second latency, zero‑downtime migration for most services, and new business capabilities such as traffic isolation, elastic scaling, and data‑driven SLA monitoring.
The naming service (MNS) is the foundation of Meituan's micro‑service governance, handling service discovery, routing isolation, and supporting tens of thousands of services with trillion‑level daily calls. To keep up with rapid business growth, MNS is being upgraded from version 1.0 to 2.0.
MNS 1.0 consists of three layers: an SDK embedded in business code, a per‑machine SgAgent that off‑loads heavy logic, and a centralized component built on ZooKeeper (MNS‑ZK) that provides health checks, authentication cache, and consistent storage. This CP‑style design caused three major challenges: limited availability (single‑point failures and network partitions), poor scalability (cluster size capped at ~300 nodes, write bottlenecks), and low performance (serial writes, high latency under hot‑spot traffic).
To address these issues, the evolution targets an AP‑oriented architecture, integration with Service Mesh, and seamless migration without service disruption.
MNS 2.0 introduces a four‑layer architecture: (1) Business System Layer – lightweight SDK/framework; (2) Proxy Access Layer – Service‑Mesh sidecar and MNS‑API for HTTP access; (3) Control Service Layer – core of the new system, providing gateway control, data distribution, and change capture modules; (4) Data Storage Layer – KV store (Meituan Cellar) replaces ZooKeeper, complemented by a relational DB and the Mafka message queue for audit and analytics. An external portal offers visual monitoring and operations.
Key outcomes of the 2.0 redesign include: parallel scaling via cluster sharding (master‑shard architecture), network‑partition tolerant reads/writes, 8× higher throughput, latency reduced from 10 s to 1 s for 1 K‑size service lists, push‑success rate > 99 %, and migration of > 80 % of services with zero major incidents. RTO dropped from hours to minutes and RPO is zero.
Beyond technical metrics, MNS 2.0 empowers business scenarios: unitization/lanes for traffic isolation, smooth release with automatic traffic cut‑off and recovery, elastic scaling for containers, and rich service‑level data (push success rate, latency) that feed SLA dashboards and data‑driven optimizations such as single‑process multi‑port refactoring, large service‑list splitting, and balanced upstream/downstream deployment.
Future directions focus on building a service‑data platform to further extract business value from collected metrics and deepening integration with cloud‑native infrastructure (Service Mesh, other cloud‑native primitives).
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Meituan Technology Team
Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
