Hugegraph
A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
Install / Use
/learn @apache/HugegraphREADME
Quick Navigation: Architecture • Quick Start • Module Map • Ecosystem • For Contributors • Community
What is Apache HugeGraph?
HugeGraph is a fast and highly-scalable graph database. Billions of vertices and edges can be easily stored into and queried from HugeGraph due to its excellent OLTP capabilities. HugeGraph is compliant with the Apache TinkerPop 3 framework allowing complicated graph queries to be achieved through the powerful Gremlin graph traversal language.
Features
- Schema Metadata Management: VertexLabel, EdgeLabel, PropertyKey, and IndexLabel
- Multi-type Indexes: Exact query, range query, and complex conditions combination query
- Plug-in Backend Store Framework: Mainly supports
RocksDB/HStore+HBase; other backends available in legacy versions ≤1.5.0(MySQL/PostgreSQL/Cassandra...) - Big Data Integration: Seamless integration with
Flink/Spark/HDFS - Complete Graph Ecosystem: In/out-memory Graph Computing + Graph Visualization & Tools + Graph Learning & AI
- Dual Query Language Support: Gremlin (via Apache TinkerPop 3) and Cypher (OpenCypher)
Ecosystem
Complete HugeGraph ecosystem components:
-
hugegraph-toolchain - Graph tools suite
-
hugegraph-computer - Integrated graph computing system
-
hugegraph-ai - Graph AI/LLM/Knowledge Graph integration
-
hugegraph-website - Documentation & website repository
Architecture
HugeGraph supports both standalone and distributed deployments:
┌─────────────────────────────────────────────────────┐
│ Client Layer │
│ Gremlin Console │ REST API │ Cypher │ SDK/Tools │
└─────────────────────────┬───────────────────────────┘
│
┌─────────────────────────▼───────────────────────────┐
│ HugeGraph Server (:8080) │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ REST API │ │ Gremlin │ │ Cypher Engine │ │
│ │(Jersey 3)│ │ (TP 3.5) │ │ (OpenCypher) │ │
│ └────┬─────┘ └────┬─────┘ └────────┬─────────┘ │
│ └─────────────┼─────────────────┘ │
│ ┌────────▼────────┐ │
│ │ Graph Engine │ │
│ │(hugegraph-core) │ │
│ └────────┬────────┘ │
└─────────────────────┼───────────────────────────────┘
│
┌────────────────────────────────┼────────────────────────────────┐
│ │ │
┌────────────▼────────────┐ ┌───────────────▼───────────────┐ ┌───────────▼──────────┐
│ Standalone Mode │ │ Distributed Mode │ │ Legacy Backends │
│ ┌───────────────────┐ │ │ ┌─────────────────────────┐ │ │ (≤v1.5) │
│ │ RocksDB │ │ │ │ HugeGraph-PD │ │ │ MySQL │ PostgreSQL │
│ │ (embedded) │ │ │ │ (Raft, 3-5 nodes) │ │ │ Cassandra │
│ └───────────────────┘ │ │ │ :8620/:8686 │ │ │ HBase (≤v1.7) │
│ │ │ └────────────┬────────────┘ │ └──────────────────────┘
│ Use Case: │ │ │ │
│ Development/Testing │ │ ┌────────────▼────────────┐ │
│ Single Node │ │ │ HugeGraph-Store │ │
│ │ │ │ (Raft + RocksDB) │ │
│ Data Scale: < 1TB │ │ │ (3+ nodes) :8520 │ │
└─────────────────────────┘ │ └─────────────────────────┘ │
│ │
│ Use Case: │
│ Production/HA/Cluster │
│ │
│ Data Scale: < 1000 TB │
└───────────────────────────────┘
Deployment Mode Comparison
| Mode | Components | Use Case | Data Scale | High Availability | |------|------------|----------|------------|-------------------| | Standalone | Server + RocksDB | Development, Testing, Single Node | < 1TB | Basic | | Distributed | Server + PD (3-5 nodes) + Store (3+ nodes) | Production, HA, Horizontal Scaling | < 1000 TB | Yes |
Module Overview
| Module | Description | |--------|-------------| | hugegraph-server | Core graph engine with REST API, Gremlin/Cypher support, and pluggable backends (RocksDB default) | | hugegraph-pd | Placement Driver for distributed mode - handles meta storage, partition management and cluster scheduling | | hugegraph-store | Distributed storage with Raft consensus for high availability and horizontal scaling | | hugegraph-commons | Shared utilities, RPC framework and common components |
<details> <summary><b>📊 Click to view detailed architecture diagram (Mermaid)</b></summary>flowchart TB
subgraph Clients["Client Layer"]
GC[Gremlin Console]
REST[REST Client]
CYPHER[Cypher Client]
SDK[SDK/Tools]
end
subgraph Server["HugeGraph Server :8080"]
API[REST API<br/>Jersey 3]
GS[Gremlin Server<br/>TinkerPop 3.5]
CS[Cypher Engine<br/>OpenCypher]
CORE[Graph Engine<br/>hugegraph-core]
API --> CORE
GS --> CORE
CS --> CORE
end
subgraph Storage["Storage Layer"]
subgraph Standalone["Standalone Mode"]
ROCKS[(RocksDB<br/>Embedded)]
end
subgraph Distributed["Distributed Mode"]
PD[HugeGraph-PD<br/>Raft Cluster<br/>:8620/:8686]
STORE[HugeGraph-Store<br/>Raft + RocksDB<br/>:8520]
PD <--> STORE
end
subgraph Legacy["Legacy Backends (≤v1.5)"]
MYSQL[(MySQL)]
PG[(PostgreSQL)]
CASS[(Cassandra)]
HBASE[(HBase, ≤v1.7)]
end
end
Clients --> Server
CORE --> ROCKS
CORE --> PD
CORE -.-> Legacy
style Server fill:#e1f5ff
style Distributed fill:#fff4e1
style Standalone fill:#f0f0f0
</details>
Quick Start
5 Minutes Quick Start
# Start HugeGraph (standalone mode)
docker run -itd --name=hugegraph -p 8080:8080 hugegraph/hugegraph:1.7.0
# Verify server is running
curl http://localhost:8080/versions
# Try a Gremlin query
curl -X POST http://localhost:8080/gremlin \
-H "Content-Type: application/json" \
-d '{"gremlin":"g.V().limit(5)"}'
Production Note: For production environments or public network exposure, you must enable the AuthSystem for security.
Prerequisites
- Java 11+ (required)
- Maven 3.5+ (for building from source)
Option 1: Docker (Fastest)
Docker is the quickest way to get started for testing or development:
# Basic usage
docker run -itd --name=hugegraph -p 8080:8080 hugegraph/hugegraph:1.7.0
# With sample graph preloaded
docker run -itd --name=hugegraph -e PRELOAD=true -p 8080:8080 hugegraph/hugegraph:1.7.0
# With authentication enabled
docker run -itd --name=hugegraph -e PASSWORD=your_password -p 8080:8080 hugegraph/hugegraph:1.7.0
For advanced Docker
