dgraph-io/dgraph
high-performance graph database for real-time use cases
Dgraph is a distributed database for connected, graph-shaped data — think social networks, recommendation engines, or any dataset where relationships between items matter as much as the items themselves. It's built from the ground up in Go to handle large-scale workloads with low latency.
What it does
- It's a native GraphQL database — you query it using GraphQL syntax, and it returns data as JSON or Protocol Buffers over HTTP or gRPC.
- It's horizontally scalable: you can add machines to a cluster to handle more data and traffic. Data is automatically sharded (split across computers) and rebalanced as the cluster grows.
- It provides ACID transactions (like traditional SQL databases) and consistent replication — copies of data stay synchronized, and reads are "linearizable" (every read sees the latest committed write).
- It's optimized at the storage level: Dgraph controls exactly how data sits on disk to minimize disk seeks and network calls, which speeds up queries.
Status & maturity
- At version v25, it's considered production-ready and used in production at multiple Fortune 500 companies.
Platforms
- Officially supports Linux (amd64 and arm64). Mac and Windows support was dropped in 2021, though you may still be able to build for other platforms (e.g., for loading data). Running via Docker is the recommended approach.
Quick start
- Pull the Docker image:
docker pull dgraph/standalone:latest, then run a standalone cluster with a one-liner. Or clone the repo, runmake setup && make install(requires Go 1.27+).
When is Dgraph a good fit?
- You have more than 10 SQL tables connected via foreign keys.
- Your data is sparse and doesn't fit neatly into SQL tables.
- You want a simple, flexible schema that's easy to maintain.
- You care about speed and performance at scale.
It combines NoSQL-level scalability with SQL-like transactions, and adds distributed joins, graph traversals, and graph operations. It also supports full-text search, regular expressions, and geo search natively.
License: Apache 2.0 (permissive open source). The README includes a comparison to Neo4j and Janus Graph, noting Dgraph is sharded/distributed (unlike Neo4j's single-server community edition), supports distributed ACID transactions, and uses GraphQL-inspired query language.
Related
- Project
- Project
- Project
- Project