You are looking at the docs for the unreleased master branch of Dgraph. The latest version is v21.03.
Ask a Question

Dgraph Database Overview

Dgraph is a horizontally scalable and distributed GraphQL database with a graph backend. Dgraph is built for the heavy transactional workloads required to power modern apps and websites, but it isn’t limited to only these types of applications. Whether you are looking to power the backend of your app, create elastic search for your website, or build a new database purely for data analysis, Dgraph is up to the task. In fact, it is in production today in the following real-world scenarios:

  • Data unification
  • Customer 360
  • Social media sites
  • Content Management Systems
  • Ecommerce stores
  • Entity resolution
  • HR management applications
  • Master data management
  • Product recommendation engines
  • Real-time chat applications

To learn more about how organizations are using Dgraph, see Dgraph Case Studies.

Dgraph database and Dgraph Cloud

You can run Dgraph database in a variety of ways:

  • Fully-managed (hosted): Dgraph Cloud provides Dgraph as a fully-managed cloud service. Dgraph Cloud Shared Instances (formerly called Slash GraphQL) give you the power of Dgraph in a low-cost hosted service running on a shared cluster. Dgraph Cloud Dedicated Instances provide an enterprise-grade service that runs on dedicated cluster instances. To learn more, see Fully-Managed Dgraph.
  • Self-managed: You can use Dgraph on-premises, hosted on your own physical infrastructure. You can also run Dgraph in your AWS, GCP, or Azure cloud infrastructure.
Note The documentation provided on this Dgraph Docs site is applicable to self-managed instances of Dgraph, and also largely applicable to Dgraph Cloud (except for content in the Deploy and Manage section). To learn more about Dgraph Cloud, see Dgraph cloud services docs.

Dgraph Cloud

Dgraph Cloud with shared instances is a fully-managed GraphQL database service that lets you focus on building apps, not managing infrastructure. Dgraph Cloud is built from the ground up to support GraphQL, and uses a graph database structure down to its lowest layers. So it integrates seamlessly with your existing ecosystem of GraphQL tools.

Dgraph Cloud gives you the power of Dgraph database in a hosted environment, providing the flexibility and performance of a horizontally-scalable and distributed GraphQL database with a graph backend, so you don’t need to configure and manage VMs, servers, firewalls, and HTTP endpoints to power your modern apps and websites. Dgraph Cloud with shared instances runs on a shared cluster so we can offer it at a low price. To learn more about Dgraph Cloud, see Dgraph Cloud Overview.

Dgraph Cloud with dedicated instances extends the capabilities of the lower-cost shared instances offering to meet the heavy workloads and other needs of enterprise customers. With Dgraph Cloud, you get dedicated cluster instances, high availability, and the option to run Dgraph in your own virtual private cloud (VPC) or bring your own Kubernetes (BYOK) environment.

Get started

Use the instructions in this section to get started using Dgraph Cloud or self-managed Dgraph today.

Get started with Dgraph Cloud

You can get started with Dgraph Cloud today with a free trial. To use Dgraph Cloud, visit our Pricing Page or Pricing Calculator to get an estimate, or contact us.

Tip Check which Dgraph release version is running on your Dgraph Cloud backend in Dgraph Cloud Settings, and then use the version selector on this page to find docs.

Get started with self-managed Dgraph

To run Dgraph on your own server, see instructions for single-node setup or instructions for cluster setup.

Note Dgraph is designed to run on Linux. As of release v21.03, Dgraph no longer supports installation on Windows or macOS. We recommend using the standalone Docker image to try out Dgraph on Windows or macOS.

To run Dgraph using the standalone Docker image

  1. Download docker: https://www.docker.com/
  2. Create a folder to store Dgraph data outside of the container, as follows: mkdir -p ~/dgraph
  3. Get the Docker standalone image, as follows: docker pull dgraph/standalone
  4. Run the Dgraph Docker standalone image, as follows:
  docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 -v ~/dgraph:/dgraph --name dgraph dgraph/standalone:v21.03.0
Tip To run the Docker standalone image for another version of Dgraph, change v21.03.0 in the command shown above to the version number for a previous release, such as v20.11.0.

After following these steps, Dgraph Alpha now runs and listens for HTTP requests on port 8080, and Ratel listens on port 8000.

Dgraph and GraphQL

Because Dgraph is a native GraphQL database, queries across sparse data sets run efficiently. As a native GraphQL database, Dgraph doesn’t have a relational database running in the background, so your data has the ability to grow and change with your app, without the need to add new tables. And when it comes time to deploy a new schema, you can do that in seconds, not hours.

To learn more about Dgraph’s GraphQL implementation, see GraphQL Overview. If you are a SQL user, see: Dgraph for SQL Users.

Glossary of Dgraph and GraphQL terms

Term Definition Learn More
Dgraph Cloud A fully-managed GraphQL database service powered by Dgraph database. Dgraph Cloud documentation
Badger A fast, open-source key-value database written in pure Go that provides the disk layer for Dgraph database. Badger documentation
data node A basic unit of data representing an entity in a graph database. Nodes are connected by edges and have predicates (or fields) that contain node data.
Dgraph Alpha A server node that serves data to clients of Dgraph database, and also provides administrator endpoints. Dgraph Alpha documentation
Dgraph database A horizontally-scalable and distributed GraphQL database with a graph backend.
Dgraph Query Language (DQL) A query language that extends and modifies GraphQL to support deep queries for modern apps. Formerly known as GraphQL+-. DQL documentation
Dgraph Zero A server node that controls a Dgraph database cluster. Dgraph Zero documentation
edge A relationship between two data nodes in a graph database.
field See predicate.
GraphQL An open-source query language for APIs and a runtime for fulfilling those queries. Dgraph GraphQL documentation
object See data node.
server node A server that makes up part of a server cluster. See Dgraph Alpha and Dgraph Zero. Dgraph Cluster Setup documentation
superflag A Dgraph CLI flag that contains one or more options used to specify command settings. Dgraph Cluster Setup documentation
predicate A property of a data node in a graph database; also a discrete piece of information available to request in a graph database.