coredns/plugin
Tobias Schmidt dd9fc8962c plugin/cache: Fix prefetching issues (#1363)
* Improve plugin/cache metrics

* Add coredns_cache_prefetch_total metric to track number of prefetches.
* Remove unnecessary Cache.get() call which would incorrectly increment
  cache counters.
* Initialize all counters and gauges at zero.

* Allow prefetching of a single request per ttl

The original implementation didn't allow prefetching queries which are
only requested once during the duration of a TTL. The minimum amount of
queries which had to be seen was therefore capped at 2.

This change also implements a real prefetch test. The existing test was
a noop and always passed regardless of any prefetch implementation.

* Fix prefetching for items with a short TTL

The default prefetch threshold (percentage) is 10% of the lifetime of a
cache item. With the previous implementation, this disabled prefetching
for all items with a TTL < 10s (the resulting percentage would be 0, at
which point a cached item is already discarded).

This change uses a time based threshold calculation and ensures that
a prefetch is triggered at a TTL of 1 at the latest.

* Fix wrong duration reporting of cached responses

The logging and metrics plugins (among others) included the duration of
a cache prefetch in the request latency of client request. This change
fixes this wrong reporting and executes the prefetch request in a
goroutine in the background.
2018-01-17 07:35:22 +00:00
..
auto Update README.md (#1375) 2018-01-11 07:31:52 +00:00
autopath Update README.md (#1376) 2018-01-11 07:32:06 +00:00
bind Manual pages (#1346) 2018-01-04 12:53:07 +00:00
cache plugin/cache: Fix prefetching issues (#1363) 2018-01-17 07:35:22 +00:00
chaos Manual pages (#1346) 2018-01-04 12:53:07 +00:00
debug Manual pages (#1346) 2018-01-04 12:53:07 +00:00
dnssec Update README.md (#1374) 2018-01-11 07:31:34 +00:00
dnstap Doc (#1369) 2018-01-10 11:45:12 +00:00
erratic Manual pages (#1346) 2018-01-04 12:53:07 +00:00
errors Manual pages (#1346) 2018-01-04 12:53:07 +00:00
etcd Doc (#1369) 2018-01-10 11:45:12 +00:00
federation Manual pages (#1346) 2018-01-04 12:53:07 +00:00
file Manual pages (#1346) 2018-01-04 12:53:07 +00:00
health Overloaded (#1364) 2018-01-10 11:41:22 +00:00
hosts pkg/fall: make Zero and Root vars not funcs (#1367) 2018-01-09 22:29:19 +00:00
kubernetes pkg/fall: make Zero and Root vars not funcs (#1367) 2018-01-09 22:29:19 +00:00
loadbalance Manual pages (#1346) 2018-01-04 12:53:07 +00:00
log plugin/log: add the super useful msg ID into the logs (#1387) 2018-01-12 18:03:47 +00:00
metrics Doc (#1369) 2018-01-10 11:45:12 +00:00
nsid Manual pages (#1346) 2018-01-04 12:53:07 +00:00
pkg pkg/fall: make Zero and Root vars not funcs (#1367) 2018-01-09 22:29:19 +00:00
pprof Doc (#1369) 2018-01-10 11:45:12 +00:00
proxy Doc (#1369) 2018-01-10 11:45:12 +00:00
reverse Simplify plugin/pkg/fall (#1358) 2018-01-07 14:51:32 -05:00
rewrite Manual pages (#1346) 2018-01-04 12:53:07 +00:00
root Manual pages (#1346) 2018-01-04 12:53:07 +00:00
route53 Add route53 plugin (#1390) 2018-01-15 09:59:29 -08:00
secondary Doc (#1369) 2018-01-10 11:45:12 +00:00
template Fix several typos (#1395) 2018-01-15 18:27:47 -08:00
test golint cleanup (#1085) 2017-09-15 23:34:02 +01:00
tls Manual pages (#1346) 2018-01-04 12:53:07 +00:00
trace Manual pages (#1346) 2018-01-04 12:53:07 +00:00
whoami Manual pages (#1346) 2018-01-04 12:53:07 +00:00
backend.go plugin/kubernetes: fix pod insecure mode (#1354) 2018-01-06 15:56:54 +00:00
backend_lookup.go plugin/{kubernetes/etcd}: dynamic SOA (#1188) 2017-11-01 10:11:34 +00:00
normalize.go CIDR query routing (#1159) 2017-10-24 10:16:03 +01:00
normalize_test.go CIDR query routing (#1159) 2017-10-24 10:16:03 +01:00
plugin.go Add pkg/fall for Fallthrough (#1355) 2018-01-07 16:32:59 +00:00