Graph databases are essential for applications that need to traverse complex relationships at scale. NebulaGraph, developed by vesoft-inc, is a distributed graph database designed from the ground up for handling trillion-edge datasets with millisecond query latency.
Unlike graph databases that bolt distribution onto a single-node design, NebulaGraph was built with a shared-nothing architecture where every component is horizontally scalable. Storage, computation, and metadata are decoupled, allowing independent scaling. The result is a graph database that can grow from a laptop to a 100+ node cluster without architectural changes.
Architecture Components
| Component | Function | Scalability |
|---|---|---|
| Meta Service | Cluster metadata, schema management | Raft consensus |
| Storage Service | Data persistence with auto-sharding | Linear horizontal |
| Graph Service | Query computation and execution | Linear horizontal |
| Monitor Service | Cluster health and performance | Centralized |
Query Processing Flow
flowchart LR
A[Client Query<br/>nGQL] --> B[Graph Service]
B --> C[Query Parser]
C --> D[Query Planner]
D --> E[Query Optimizer]
E --> F[Execution Plan]
F --> G[Storage Service 1]
F --> H[Storage Service 2]
F --> I[Storage Service N]
G --> J[Result Aggregation]
H --> J
I --> J
J --> K[Final Result]Queries enter via the Graph Service where they are parsed, planned, and optimized. The execution plan is distributed across Storage Service nodes, each returning partial results that are aggregated into the final result.
Performance Characteristics
| Metric | NebulaGraph | Neo4j | JanusGraph | Amazon Neptune |
|---|---|---|---|---|
| Max graph size | 100 trillion | 100 billion | 10 billion | 100 billion |
| Query latency (1B edges) | 2ms | 5ms | 15ms | 8ms |
| Write throughput | 1M/s | 50K/s | 100K/s | 200K/s |
| Node count scalability | 100+ | Limited | 50+ | Managed |
Key Capabilities
NebulaGraph supports the nGQL query language (similar to SQL for graphs), ACID transactions, full-text search, and graph algorithms. It integrates with Spark, Flink, and Kafka for data pipelines, and supports visualization tools for graph exploration.
For more information, visit the NebulaGraph GitHub repository and the NebulaGraph documentation.
Frequently Asked Questions
Q: What query language does NebulaGraph use? A: nGQL, a SQL-like graph query language designed for ease of use and expressiveness.
Q: Can NebulaGraph run on a single machine? A: Yes, it supports single-node deployment for development and testing.
Q: How does NebulaGraph handle data replication? A: Storage partitions are replicated across nodes using Raft consensus for fault tolerance.
Q: Does NebulaGraph support graph algorithms? A: Yes, including PageRank, community detection, shortest path, and connected components.
Q: What storage engines does NebulaGraph support? A: It uses its own KV store optimized for graph workloads, built on RocksDB.
無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分!