In memory dns caching server.
- Built using GoLang and redis.
- Clean and effective code
- Hash based database storing records (redis)
- Multi threading done right
- Using low overhead libraries wherever possible
- Using in memory data as much as possible when also maintaining stability
Note : this project is built for the linux system, compatibility with windows is not confirnmed(This can be an issue, propose if you wish to). To run this project, you need to have golang and redis installed. MacOS users can run
brew install go redis
to install go and redis
After getting the dependencies, you can run:
$ ./run.sh
Should compile and start the DNS server.
- A single resolve test can be done like so :
$ dig @0.0.0.0 google.com
It's best you run the above command twice. This is because the first resolve doesn't hit the cache, second will.
- A performance test can be done like so after starting the DNS server (needs dnsperf installed before hand):
./test.sh --10mtest
- Down below we see comparision to cloudflare and google dns server (which note runs on very powerful hardware, mine runs simply on my computer) :
- GRDNS : ~110QP/s || google's DNS : ~360QP/s || cloudflare's DNS : 220QP/s
- images :