rescached is a daemon that caching internet name and address on local
memory for speeding up DNS resolution.

rescached primary goal is only to caching DNS queries and answers, used
by personal or small group of users, to minimize unneeded traffic to
outside network.

This release is dedicated to Archer and github user `chadberg` and
`skydrome` who keeps reporting issues and may still use the original
version. Whoever you are, thank you!


=  Features

List of current features,

-  Enable to handle request from UDP and TCP connections
-  Enable to forward request using UDP or TCP
-  Load and serve addresses and hostnames in `/etc/hosts`
-  Load and serve hosts formated files inside directory
   `/etc/rescached/hosts.d/`
-  Blocking ads and/or malicious websites through host list in
   `/etc/rescached/hosts.d/hosts.block`
-  Support loading and serving master (zone) file format from
   `/etc/rescached/master.d`
-  Integration with openresolv
-  Support DNS over HTTPS (DoH) (draft 14)

For more information see https://github.com/shuLhan/rescached-go .


=  Background

The original rescached software is written in C++ [1], written back
since 2009.  Over time, the more feature to add, the more painful to
maintenance and test it.  I can't trust and remember my own code after
being long enough not meddling with it.

After having experienced with Go and confidence enough, I try to
porting it. The time its take to porting it is about one month.
The first step is to create DNS library [2] that support client and
server model.
Everything else in rescached is just a layer to manage caches from DNS
responses on top of the library.

Adding new features, like loading master file, integration with
openresolv and DoH is take about one months.  Thanks to Go standard
packages that provide user all the required libraries for HTTP and TLS.

Overall I am very happy working with Go.


=  Benchmark

==  resolverbench

Result of benchmarking with local blocked host file,

----
master ms 0 % ./resolverbench 127.0.0.1:53 scripts/hosts.block
= Benchmarking with 27367 messages
= Total: 27367
= Failed: 0
= Elapsed time: 1.053238347s
----

== dnstrace

Result of benchmarking with 10000 query and 100 concurrent connections
using dnstrace [3],

----
master ms 0 % dnstrace --recurse --codes --io-errors -s 127.0.0.1:53 -t
A -n 10000 -c 100 redsift.io Benchmarking 127.0.0.1:53 via udp with 100
conncurrent requests


Total requests:  1000000 of 1000000 (100.0%)
DNS success codes:      1000000

DNS response codes
        NOERROR:        1000000

Time taken for tests:    10.318186376s
Questions per second:    96916.3

DNS timings, 1000000 datapoints
         min:            0s
         mean:           1.017194ms
         [+/-sd]:        770.525µs
         max:            39.845887ms

DNS distribution, 1000000 datapoints
    LATENCY   |                                             | COUNT
+-------------+---------------------------------------------+--------+
  131.071µs   |                                             |   1722
  393.215µs   | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄                            | 115890
  655.359µs   | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄                   | 185089
  917.503µs   | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ | 316551
  1.179647ms  | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄   | 300305
  1.441791ms  | ▄▄▄▄                                        |  31218
  1.703935ms  | ▄▄                                          |  12005
  1.966079ms  | ▄                                           |   6387
  2.228223ms  | ▄                                           |   5007
  2.490367ms  |                                             |   3196
  2.752511ms  |                                             |   2573
  3.014655ms  |                                             |   2486
  3.276799ms  |                                             |   2012
  3.538943ms  |                                             |   1814
  3.801087ms  |                                             |   1806
  4.063231ms  |                                             |   1512
  4.325375ms  |                                             |   1099
  4.587519ms  |                                             |   1077
  4.849663ms  |                                             |    785
  5.111807ms  |                                             |    759
  5.373951ms  |                                             |    901
  5.636095ms  |                                             |    765
  5.898239ms  |                                             |    874
  6.160383ms  |                                             |    654
  6.422527ms  |                                             |    476
  6.684671ms  |                                             |    351
  6.946815ms  |                                             |    294
  7.208959ms  |                                             |    245
  7.471103ms  |                                             |    292
  7.733247ms  |                                             |    261
  7.995391ms  |                                             |    255
  8.257535ms  |                                             |    132
  8.650751ms  |                                             |    396
  9.175039ms  |                                             |    193
  9.699327ms  |                                             |     78
  10.223615ms |                                             |     51
  10.747903ms |                                             |    102
  11.272191ms |                                             |     23
  11.796479ms |                                             |      0
  12.320767ms |                                             |      0
  12.845055ms |                                             |      0
  13.369343ms |                                             |      0
  13.893631ms |                                             |      0
  14.417919ms |                                             |      0
  14.942207ms |                                             |      0
  15.466495ms |                                             |      0
  15.990783ms |                                             |      0
  16.515071ms |                                             |      0
  17.301503ms |                                             |      0
  18.350079ms |                                             |      0
  19.398655ms |                                             |    192
  20.447231ms |                                             |    112
  21.495807ms |                                             |      0
  22.544383ms |                                             |      0
  23.592959ms |                                             |      0
  24.641535ms |                                             |     12
  25.690111ms |                                             |     28
  26.738687ms |                                             |     14
  27.787263ms |                                             |      5
  28.835839ms |                                             |      0
  29.884415ms |                                             |      0
  30.932991ms |                                             |      0
  31.981567ms |                                             |      0
  33.030143ms |                                             |      0
  34.603007ms |                                             |      0
  36.700159ms |                                             |      0
  38.797311ms |                                             |      1
----

--
[1] https://github.com/shuLhan/rescached
[2] https://github.com/shuLhan/share/tree/master/lib/dns
[3] https://github.com/redsift/dnstrace

-- 
{ "github":"github.com/shuLhan", "site":"kilabit.info" }

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to