Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING] feat(Dgraph): Read-Only replicas #7272

Merged
merged 12 commits into from
Jan 18, 2021
Merged

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Jan 12, 2021

This PR allows a Dgraph Alpha or Zero instance to join as a "learner" node. That allows a user to spin up a replica instance across the world, without paying for the cost of latency. This replica can be used to serve best-effort queries really fast. It can also do both reads and writes, but would incur the latency of the network calls to the main cluster.

The main code change is small. But, due to the flag changes, this PR touches lots of config files.

Breaking: The breaking change here is how we pass in Raft flags. Before this PR, we used to have --idx flag. That flag is now gone. Both Alpha and Zero now use a "raft" flag, which takes idx=N; group=M; learner=true string based options.


This change is Reviewable

@manishrjain manishrjain requested a review from martinmr as a code owner January 18, 2021 14:43
Copy link
Contributor Author

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Tested and reviewed with @jarifibrahim .

Reviewable status: 0 of 14 files reviewed, 1 unresolved discussion (waiting on @martinmr and @vvbalaji-dgraph)


dgraph/cmd/zero/zero.go, line 539 at r1 (raw file):

				return proposal
			}
			// TODO: Allow each Alpha to specify which group it should be part of.

remove this.

@netlify
Copy link

netlify bot commented Jan 18, 2021

✔️ Deploy preview for dgraph-docs ready!

🔨 Explore the source changes: 5472d86

🔍 Inspect the deploy logs: https://app.netlify.com/sites/dgraph-docs/deploys/6005fca1495dfb00077eae90

😎 Browse the preview: https://deploy-preview-7272--dgraph-docs.netlify.app

@manishrjain manishrjain merged commit b738423 into master Jan 18, 2021
@manishrjain manishrjain deleted the mrjn/read-only-replicas branch January 18, 2021 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants