Skip to content
/ dcache Public

Plugin: Asynchronous Distributed Cache for Distributed System.

License

Notifications You must be signed in to change notification settings

bootjp/dcache

Repository files navigation

dcache

CoreDNS Plugin: Asynchronous Distributed Cache for Distributed System.

Name

dcache - enables a networked async cache using Redis Pub/Sub.

dcache is a [d]istributed [cache] plugin.

Description

Using dcache, you can use Redis Pub/Sub to asynchronously share name resolution resolved by other nodes. This means that DNS queries do not use unnecessary communication to retrieve the cache, and it operates with very low latency. It can be used in conjunction with the CoreDNS standard cache plug-in. The TTL of the cache is the smallest value in the response.

If this plugin is enabled and you cannot connect to Redis, it does nothing and does not interfere with CoreDNS operation.

What is the difference from redisc?

redisc takes the data to Redis after a DNS query, but dcache uses Pub/Sub to keep the cache data in memory asynchronously.

dcache provides better latency than redisc in environments with very large DNS queries such as crawling.

Config

Example

all zone enable dcache.

. {
    forward . 1.1.1.1
    cache
    dcache example.org:6379
}

syntax


dcache [Redishost]:[Port]

Metrics

If monitoring is enabled (via the prometheus directive) then the following metrics are exported:

  • coredns_dcache_hits_total{server} - Counter of cache hits.
  • coredns_dcache_misses_total{server} - Counter of cache misses.
  • coredns_dcache_redis_errors_total{server} - Counter of errors when connecting to Redis.
  • coredns_dcache_discard_cache_total{server} - Counter of data that failed deserialization.

Releases

No releases published

Packages

No packages published

Languages