How it helps your business
Key Benefits
- GraphQL Native: Build faster with a database that speaks your application's language.
- Extreme Latency: Optimized for sub-second queries across billions of nodes and edges.
- Easy Scaling: Simply add more Alpha nodes to increase storage and query throughput.
- Data Integrity: Fully ACID compliant transactions even in a distributed environment.
- All-in-One Search: Integrated search capabilities mean you don't need a separate Elasticsearch instance for your graph data.
Production Architecture Overview
- Dgraph Zero: Manages the cluster metadata, assigns shards, and maintains Raft-based consensus.
- Dgraph Alpha: Stores the actual graph data and handles all incoming queries and mutations.
- Ratel: A web-based UI for exploring your graph and managing the cluster.
- Persistent Storage: High-speed SSDs for storage volumes to ensure low-latency I/O.
- Load Balancer: Standard proxy to distribute traffic across your Dgraph Alpha nodes.
How we deploy this for you
Security Hardened
Firewalls, SSL, and hardened kernels out of the box.
Performance Tuned
Optimized for speed with cache and DB fine-tuning.
Automated Backups
Daily off-site backups so you never lose your data.
Private Cloud
You own the server and the data. No middleman.
Implementation Blueprint
Prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start dockerDocker Compose Production Setup (Single Node Cluster)
version: '3.8'
services:
zero:
image: dgraph/dgraph:latest
container_name: zero
volumes:
- dgraph_data:/dgraph
ports:
- "5080:5080"
- "6080:6080"
command: dgraph zero --my=zero:5080
restart: always
alpha:
image: dgraph/dgraph:latest
container_name: alpha
volumes:
- dgraph_data:/dgraph
ports:
- "8080:8080"
- "9080:9080"
command: dgraph alpha --my=alpha:7080 --zero=zero:5080
depends_on:
- zero
restart: always
ratel:
image: dgraph/ratel:latest
container_name: ratel
ports:
- "8000:8000"
restart: always
volumes:
dgraph_data:Kubernetes Production Deployment (Recommended)
helm repo add dgraph https://charts.dgraph.io
helm install my-release dgraph/dgraph --namespace database --create-namespace- High Availability: Automatically runs multiple Zero and Alpha nodes for fault tolerance.
- Scalable Storage: Uses Kubernetes StatefulSets and PersistentVolumeClaims for reliable data management.
- Auto-sharding: Dgraph Zero handles the distribution of shards across your Alpha pods automatically.
Scaling & Performance
- Add More Alphas: To handle more concurrent queries or larger datasets, simply increase your Alpha pod count.
- CPU Isolation: In extreme latency environments, use Kubernetes CPU limits to ensure Alpha pods have dedicated cores.
- Memory Management: Monitor the
lru_cachemetrics to ensure your Alphas have enough RAM for your active working set.
Backup & Disaster Recovery
- Dgraph Snapshots: Use the
/exportendpoint to create a consistent, portable JSON/RDF export of your entire graph. - Point-in-Time Recovery: Dgraph Enterprise supports incremental backups for granular recovery.
- Volume Snapshots: Regularly snapshot your cloud persistent volumes as a baseline for full cluster recovery.
Includes Security & performance standards
Best place to host Dgraph
We recommend Hostinger for its reliability and low cost. It's the perfect home for your new apps, featuring easy setup and 24/7 support.
Get Started on HostingerCompare Similar Tools
Kubernetes
Kubernetes is a production-grade, open-source platform for automating deployment, scaling, and operations of application containers.
Supabase
Supabase is the leading open-source alternative to Firebase. It provides a full backend-as-a-service (BaaS) powered by PostgreSQL, including authentication, real-time subscriptions, and storage.