Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 2 KB

README.md

File metadata and controls

40 lines (23 loc) · 2 KB

Strongly Consistent DNS using Raft Consensus

Go Report Card

A repository containing our learnings and implementations for the project "Distributed DNS in the Cloud" under IEEE-NITK.

  • Blog Article explaining the project.

  • Material Related to Learning Phase - Repo

  • Branches:

    • main (current branch) - replicated key-value store using Raft consensus (and tests)
    • aws-dns - extends the replicated key-value store so that it can be used in the DNS service
  • Wiki explaining different aspects of the Raft consensus implementation.

How to Run Locally (As a Replicated Key-Value Store):

  • Clone the repo.

  • Run multiple terminals (one for each replica).

  • Change directory to the cloned repo in each terminal window.

  • On each terminal, run go run . -n <number_of_replicas> and follow the on screen instructions.

  • For running tests, use go test. NOTE: Do not run the tests in parallel.

Making requests from the client:

Assume that the leader is running the server listening for client requests on port :xyzw on localhost.

Use curl to access the key value store and perform any of the CRUD functions

POST request : curl -d "value=<value>&client=<id>" -X POST http://localhost:xyzw/<key>
GET request : curl -X GET http://localhost:xyzw/<key>
PUT request : curl -d "value=<value>&client=<id>" -X PUT http://localhost:xyzw/<key>
DELETE request : curl -X DELETE http://localhost:xyzw/<key>