Meituan's Graph Database Selection and Platform Construction
This article presents Meituan's comprehensive evaluation of open‑source graph databases, the rationale for selecting NebulaGraph, and the design of a high‑availability, high‑throughput graph database platform that supports multi‑hop queries, massive data ingestion, real‑time synchronization, and visualization for various business scenarios.
Graph data structures naturally model real‑world entities such as users, stores, and couriers, and Meituan has extensive multi‑hop query and storage needs across four major scenarios: graph mining, security risk control, link analysis, and organizational hierarchy management.
The company evaluated the top open‑source graph databases, classifying them into three groups. The first group (Neo4j, ArangoDB, Virtuoso, TigerGraph, RedisGraph) lacks distributed scalability. The second group (JanusGraph, HugeGraph) provides a graph abstraction layer but cannot meet low‑latency multi‑hop query requirements. The third group (DGraph, NebulaGraph) redesigns storage and execution engines for efficient multi‑hop traversal and satisfies Meituan's criteria.
After benchmarking DGraph, NebulaGraph, and HugeGraph on the LDBC‑SNB dataset, NebulaGraph demonstrated superior data import speed, real‑time write performance, and multi‑hop query latency, leading to its selection as the foundation of the platform.
NebulaGraph's architecture consists of three services—Meta Service, Storage Service, and Query Service. Meta Service manages schema, partitioning, and Raft‑based consensus; Storage Service implements a shared‑nothing, distributed storage layer built on RocksDB; Query Service provides a stateless compute layer that parses queries into ASTs, generates execution plans, and executes them.
The platform is organized into four layers: data application (SDK integration), data storage (supporting both CP and AP deployment models), data production (ETL jobs, streaming ingestion via Spark/Flink), and a support platform offering schema management, access control, monitoring, visualization, and cluster lifecycle operations.
High‑availability is achieved through a multi‑cluster AP design, where each application can deploy several clusters across regions; if one cluster fails, others seamlessly take over, ensuring 99.99% SLA. Data ingestion at the scale of billions of records per hour is optimized by generating SST files directly in Spark and bulk‑loading them into NebulaGraph, reducing CPU/IO pressure.
Real‑time write synchronization uses Kafka: SDK writes are enqueued to Kafka, and agents in each cluster consume the stream, guaranteeing eventual consistency across clusters while preserving order per vertex and its outgoing edges.
The visualization module provides ID/index lookup, vertex/edge cards, one‑hop exploration, graph editing, and filtering, enabling users to explore large sub‑graphs without overwhelming the UI.
Business practice cases include an intelligent assistant powered by a knowledge graph for food and travel, a medical‑beauty search recall system, graph‑based recommendation reasoning, and code‑dependency analysis for precise testing.
In summary, Meituan's graph database platform offers a self‑service, highly available solution for managing trillion‑scale graph data, with future plans to extend capabilities to graph learning and advanced graph computation.
DataFunTalk
Dedicated to sharing and discussing big data and AI technology applications, aiming to empower a million data scientists. Regularly hosts live tech talks and curates articles on big data, recommendation/search algorithms, advertising algorithms, NLP, intelligent risk control, autonomous driving, and machine learning/deep learning.
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.