You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Given the performance requirements, Eclipso maintains a local hashmap containing the zone file database and does not introduce an external database or additional network latency to DNS domain requests.
Eclipso will monitor the following to live reload zone file changes:
Local filesystem - Automatically live reload zone files based on filesystem events (add, modified & removed files)
S3 Bucket Sync - Periodic scheduler to compare the remote S3 bucket to the local zone database
S3 Bucket events - Roadmap, receive S3 events via SQS/SNS to live changes in the bucket
DynamoDB Stream - Roadmap, receive a live stream from DynamoDB to sync local state
Environment variables
Configuration of Eclipso is made via environment variables.
Local directory config
ZONE_DIR="config/domains"
S3 configuration
To read configuration files from a specified S3 bucket
Specify the S3 bucket sync period in seconds (default 60).
Global config
PORT=5353
Run Eclpiso on the specified (UDP) port 5353. Default 53.
ECLIPSO_LOG_IGNORE=1
Disable verbose logging
ECLIPSO_LOG_DEBUG=1
Enable additional debug logs
Zone configuration file
Example configuration file
# Domain configuration file in TOML format.version = 1.0# Domain settings[domain]domain = "hello_a.net"created = 2021-05-27T07:32:00Zmodified = 2022-05-27T07:32:00Zverified = trueactive = trueownerid = 10# Default settings if not defined in each [[records]][defaults]ttl = 3600type = 1class = 1# Domain entry, one entry per record# A record for root domain, hello_a.net > 203.100.1.1[[records]]domain = ""address = "203.100.1.1"# A record for www.hello_a.net > 203.100.1.1[[records]]domain = "www."address = "203.100.1.1"# A record for host-1.hello_a.net > 203.100.1.2[[records]]domain = "host-1."address = "203.100.1.2"# A record for host-1.hello_a.net > 203.100.1.3[[records]]domain = "host-2."address = "203.100.1.3"# MX record for hello_a.net, with MX preference set. [[records]]domain = ""type = 15preference = 10address = "host-1.hello_a.net."# MX record for hello_a.net, with MX preference set. [[records]]domain = ""type = 15preference = 20address = "host-2.hello_a.net."# TXT record to specify SPF record[[records]]domain = ""type = 16address = "v=spf1 ip:203.100.1.2 ip:203.100.1.3 mx a -all"# Sample TXT record for google-site-verification[[records]]domain = ""type = 16address = "google-site-verification=3a13e1788d7a1c3b4602afc083e855de"
To run Eclipso with the sample domain, append the configuration file to./config/domains/hello_a.net.toml
Run Eclpiso:
ZONE_DIR="./config/domains" ./bin/eclipso
Query the local instance to validate:
$ dig @127.0.0.1 hello_a.net txt;; QUESTION SECTION:;hello_a.net.INTXT;; ANSWER SECTION:hello_a.net.3600INTXT"v=spf1 ip:203.100.1.2 ip:203.100.1.3 mx a -all"hello_a.net.3600INTXT"google-site-verification=3a13e1788d7a1c3b4602afc083e855de"$ dig @127.0.0.1 hello_a.net mx; <<>> DiG 9.10.6 <<>> @127.0.0.1 hello_a.net mx; (1 server found);; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43492;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0;; WARNING: recursion requested but not available;; QUESTION SECTION:;hello_a.net.INMX;; ANSWER SECTION:hello_a.net.3600INMX10 host-1.hello_a.net.hello_a.net.3600INMX20 host-2.hello_a.net.
Run within docker
Using docker-compose (S3 bucket):
AWS_ACCESS_KEY="X" AWS_SECRET_ACCESS_KEY="Y" ZONE_DIR="s3://my-bucket" AWS_REGION="us-west-1" docker-compose up -d
Standalone docker (filesystem method):
docker run --mount src=~/eclipso/config/domains,target=/config/domains,type=bind -e ZONE_DIR="/config/domains" -p 53:53/udp calacode/eclipso-dns
Run as a standalone daemon
ZONE_DIR=./config/domains ./bin/eclipso
High-level Roadmap
Version 1.0.X:
DNS server framework
Filesystem support for zone files
Filesystem live-reload events
S3 Bucket support for zone files
S3 resync period for live-reload
Implement a hashmap for the local zone database
Docker support
Immediate roadmap:
Support additional zone types (SRV)
DynamoDB support
DynamoDB stream support
Improve benchmarking
Improve CLI flag support and env usage
General roadmap:
Optimise local hashmap use Net.IP (v4/v6) types
Additional API daemon to add/delete/update zone files
Health-check support, change return address if end-point not answering
DNS resolver option - Raw lookups via root-servers to act as a DNS forwarder
Benchmarking
Installbenchstat to compare multiple benchmarks for a more accurate reading
go get golang.org/x/perf/cmd/benchstat
Next, run the benchmark:
make bench
This will simulate 24 domains (hello_a.net ... hello_z.net) with ~255 sub-domains (host-1 ... host-255) with sample TXT records. The benchmark script will query the local instance each record for benchmarking purposes.