Sign inSign up

clevercloud/stream-dns

By clevercloud

•Updated over 6 years ago

A DNS server written in Go with an event stream architecture, updated via kafka

Image
0

565

clevercloud/stream-dns repository overview

⁠Stream-DNS

Build Status

Stream-dns is a DNS server written in Go originally written at Clever Cloud⁠. Stream-dns can listen for DNS requests coming in over UDP/TCP and use kafka as datastore and zone propagation. It grew from a need at Clever Cloud⁠ to handle resilience and availability in our DNS. It innovates through his use of an external event source to manage DNS zones, which reduce DNS propagation, remove multiple levels of DNS caches, increase the scalability and more. Take a look at the Design Motivation⁠ to know more.

⁠Table of Contents

⁠Features:

Following are some highlights of Stream-DNS:

  • Serve zone data and resolve for none zone authority
  • act as a primaries server
  • Automatically load zone from Kafka.
  • Forward queries to some other (recursive) nameserver.
  • Provide metrics with the statsd format
  • Provide query and error logging
  • Systemd integration (service)

⁠Usage

Take a look at the manual⁠ to understand how to build, configure and run Stream-DNS. The documentation⁠ will provide more precise information to help you to use Stream-DNS.

⁠Compilation from source

To compile Stream-dns, we assume you have a working Go setup. See various tutorials if you don’t have that already configured. Stream-dns is using Go modules for its dependency management.

Build and run:

$ go build -o stream-dns
$ ./stream-dns

(Optional step) create a vendor directory for dependencies:

go mod vendor

⁠Run it

Once you have a stream-dns binary. You must take a look at the configuration⁠ section in the manual⁠ to see how you can configure a stream-DNS. So as a test, we start stream-dns to run on port 8053 and send it a query using dig⁠:

$ DNS_ADDRESS="127.0.0.1:8053" ./stream-dns

And from a different terminal window, a dig should return something similar to this:

$ dig @127.0.0.1 -p 8053 a <my domain>
...
;; QUESTION SECTION:
<your question>

;; ANSWER SECTION:
<the answers>
⁠Run it with Docker

Stream-DNS requires Go to compile. However, if you already have docker installed and prefer not to setup a Go environment, you could use our docke image easily:

docker build -t $USER/stream-dns .
docker run --rm -p 8053:53 stream-dns

⁠Contact

All of the discussion around the project happens in the issues⁠, so please check the list there.

Tag summary

Content type

Image

Digest

Size

9.4 MB

Last updated

over 6 years ago

docker pull clevercloud/stream-dns