Skip to content

Commit

Permalink
docs: Add section about ludricrous mode. (dgraph-io#5310)
Browse files Browse the repository at this point in the history
All the ludicrous mode changes made it in v20.03.1.

Fixes DGRAPH-1187.
  • Loading branch information
danielmai authored and dna2github committed Jul 18, 2020
1 parent ae8f3f2 commit 6f64f95
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions wiki/content/deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,41 @@ Dgraph alpha instances more evenly.
- The `--shufflers` controls the level of parallelism in the shuffle/reduce
stage. Increasing this increases memory consumption.

## Ludicrous Mode

Ludicrous mode is available in Dgraph v20.03.1 or later.

Ludicrous mode allows Dgraph to ingest data at an incredibly fast speed. It differs from the normal mode as it provides fewer guarantees. In normal mode, Dgraph provides strong consistency. In ludicrous mode, Dgraph provides eventual consistency. In ludicrous mode, any mutation which succeeds **might be available eventually**. **Eventually** means the changes will be applied later and might not be reflected in queries away. If Dgraph crashes unexpectedly, there **might** be unapplied mutations which **will not** be picked up when Dgraph restarts. Dgraph with ludicrous mode enabled behaves as an eventually consistent system.


**How do I enable it?**

Ludicrous mode can be enabled by setting the `--ludicrous_mode` config option to all Zero and Alpha instances in the cluster.


**What does it do?**

It doesn't wait for mutations to be applied. When a mutation comes, it proposes the mutation to the cluster and as soon as the proposal reaches the other nodes, it returns the response right away. You don't need to send a commit request for mutation. It's equivalent to having CommitNow set automatically for all mutations. All the mutations are then sent to background workers which keep applying them.

Also, Dgraph does not sync writes to disk. This increases throughput but may result in loss of unsynced writes in the event of hardware failure.


**What is the trade off?**

As mentioned in the section above, it provides amazing speed at the cost of some guarantees.

It can be used when we have write-heavy operations and there is a time gap between queries and mutations, or you are fine with potentially reading stale data.

There are no transactions in ludicrous mode. That is, you cannot open a transaction, apply a mutation, and then decide to cancel the transaction. Every mutation request is committed to Dgraph.

**Can the cluster run with HA?**

Yes, ludicrous mode works with the cluster set up in a highly-available (HA) configuration.

**Can the cluster run with multiple data shards?**

Yes, ludicrous mode works with the cluster set up with multiple data shards.

## Monitoring
Dgraph exposes metrics via the `/debug/vars` endpoint in json format and the `/debug/prometheus_metrics` endpoint in Prometheus's text-based format. Dgraph doesn't store the metrics and only exposes the value of the metrics at that instant. You can either poll this endpoint to get the data in your monitoring systems or install **[Prometheus](https://prometheus.io/docs/introduction/install/)**. Replace targets in the below config file with the ip of your Dgraph instances and run prometheus using the command `prometheus -config.file my_config.yaml`.

Expand Down

0 comments on commit 6f64f95

Please sign in to comment.