Apache HugeGraph is a fast, highly-scalable, and distributed graph database designed to handle datasets exceeding 100 billion vertices and edges. It complies with the Apache TinkerPop 3 framework and supports complex graph traversals using Gremlin and OpenCypher query languages. Beyond core graph storage and querying, it is integrated with a full ecosystem for graph computing (hugegraph-computer), data loading (hugegraph-toolchain), and AI/knowledge graph integration (hugegraph-ai) pom.xml29-31 README.md23-53
HugeGraph supports two primary deployment modes: Standalone and Distributed. Its architecture is composed of three main modular components that can scale independently, enabling flexible deployment tailored to the use case.
HugeGraph Server: The core graph engine providing REST APIs (built on Jersey 3), Gremlin query execution (TinkerPop 3.5+), Cypher query engine (OpenCypher), and graph transaction and storage abstractions within the hugegraph-core module README.md66-76 README.md112
HugeGraph PD (Placement Driver): The metadata and cluster coordination service that manages cluster membership, partition balancing, failover scheduling, and metadata storage. It uses Raft consensus (via SOFA-jraft) to ensure high availability and consistency README.md113 hugegraph-pd/README.md8-14
HugeGraph Store: The distributed storage backend that manages persistent storage using RocksDB as the embedded key/value engine combined with Apache JRaft for data replication and consensus among storage nodes. It supports horizontally scalable storage clusters README.md114 hugegraph-store/AGENTS.md7-13
The diagram below maps important runtime components to their corresponding modules and key code artifacts. It bridges the natural language architecture with code entities, facilitating code exploration.
Sources: README.md59-99 hugegraph-pd/AGENTS.md55-82 AGENTS.md32-44 hugegraph-pd/README.md204-209 hugegraph-store/AGENTS.md38-48
Apache HugeGraph offers a range of features suitable for enterprise-grade large-scale graph databases:
Multi-Language Querying: Full support for both Gremlin (Apache TinkerPop 3.5+) and OpenCypher query languages, enabling expressive and flexible graph traversal and pattern matching README.md37
Schema Metadata Management: Comprehensive schema system supporting entity types such as VertexLabel, EdgeLabel, PropertyKey, and IndexLabel with rich metadata options for indexing and storage optimization README.md32
Pluggable Storage Backends: Supports a variety of backend storage engines including embedded RocksDB for standalone mode, HStore for distributed deployments, and legacy support for HBase, Cassandra, MySQL, PostgreSQL, and Palo in older versions README.md34
Distributed High Availability: Distributed deployments use Raft consensus through SOFA-jraft to ensure consistency, partition balancing, leader election, and cluster failover management hugegraph-pd/README.md16-17
Advanced Indexing and Query Optimization: Supports exact, range, and complex condition combination queries, facilitating efficient graph search with multi-type indexes README.md33
HugeGraph supports flexible deployments to fit different operational needs and data scale requirements.
| Mode | Components | Use Case | Data Scale | High Availability |
|---|---|---|---|---|
| Standalone | Server + embedded RocksDB | Development, Testing | < 1TB | Basic |
| Distributed | Server + PD (3-5 nodes) + Store (3+ nodes) | Production, HA Clusters | < 1000TB | Yes (Raft-based) |
Standalone mode is simple and suitable for local development and small data volumes. The distributed mode provides horizontal scalability and fault tolerance for large production workloads by introducing the PD metadata cluster and a scalable Store cluster.
For step-by-step instructions on building and running each mode, see the child page Getting Started & Deployment. Configuration details for both modes are in Configuration Reference.
Sources: README.md101-107 hugegraph-server/hugegraph-dist/docker/README.md11-28 hugegraph-pd/README.md121-153
HugeGraph is organized as a Maven multimodule project with distinct modules for core components and subsystem responsibilities.
| Module | Description | Key Classes / Anchors |
|---|---|---|
hugegraph-server | Core graph engine with REST, Gremlin, Cypher APIs | RestServer, HugeGraph, StandardHugeGraph |
hugegraph-pd | Distributed cluster management (Placement Driver) | PartitionService, StoreNodeService, RaftEngine |
hugegraph-store | Distributed storage nodes, RocksDB + Raft | HgStoreEngine, PartitionEngine, RocksDBStore |
hugegraph-struct | Shared graph data contracts and schema types | BaseVertex, BaseEdge, HugeType, DataType |
hugegraph-commons | Common utilities, config framework, RPC | HugeConfig, KeyLock, EventHub, LockGroup |
This modular approach facilitates separation of concerns, parallel development, and flexible deployment.
Sources: pom.xml101-109 README.md108-115 hugegraph-pd/AGENTS.md55-76 hugegraph-store/AGENTS.md38-48 AGENTS.md20-28 AGENTS.md30-36
Due to dependencies among modules, HugeGraph follows a strict Maven build order. Developers should build modules in this sequence for correct linkage:
The dependency and build order is illustrated below, bridging naming in documentation to the code modules.
Sources: AGENTS.md20-28 hugegraph-store/AGENTS.md173-185 hugegraph-pd/AGENTS.md37-53
This page provides a high-level overview of Apache HugeGraph. To explore specific subsystems and usage, please refer to the linked child pages:
Getting Started & Deployment — Instructions for building, configuring, and running HugeGraph in standalone and distributed modes, including Docker images and startup scripts.
Configuration Reference — Comprehensive guide to configuration files like rest-server.properties, hugegraph.properties, gremlin-server.yaml, and application.yml for PD and Store. Includes backend selection, authentication, and tuning settings.
For deeper internal architecture of the Server, PD, and Store modules, see their dedicated pages in this wiki.
This completes the overview of the Apache HugeGraph codebase, architecture, core capabilities, and deployment models.
Sources: Combined references above.
Refresh this wiki
This wiki was recently refreshed. Please wait 6 days to refresh again.