Git Product home page Git Product logo

coredns's People

Contributors

aledbf avatar bradbeam avatar caniszczyk avatar canthefason avatar chrisohaver avatar cricketliu avatar dependabot-preview[bot] avatar dependabot[bot] avatar dilyevsky avatar ekleiner avatar greenpau avatar grobie avatar ihac avatar jiachengxu avatar joewrightss avatar johnbelamaric avatar kirillovdenis avatar mastersplinter01 avatar miekg avatar mrichmon avatar pmoroney avatar rajansandeep avatar rdrozhdzh avatar stp-ip avatar superq avatar tantalor93 avatar truongnh1992 avatar varyoo avatar ykhr53 avatar yongtang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

coredns's Issues

Change health check logic

The plugin should allow to set the following params:

  • Health check method
  • Health check request timeout
  • Cache size
  • Cache expiration and health check interval (initiate health status update when the cache entry expires)
  • Filter (check records name for full matching), must be the last because there can be multiple names for filtering

Workflow:

  1. Get records
  2. If records doesn't match filter -> return all records
  3. If records match filter -> return health records from cache (if cache is empty return all records) and trigger health check (add records to pool that is checked periodically to update health status)

Too many healthchecks

As @532910 noticed healthcheck plugin sends to many requests.
We should use a different key format for caching. Currently, it may happen that cache contains two different records with the same IP to check.

GeoDNS doesn't handle location properly

What happened:

sergio@lily:~$ host cdn.fs.neo.org
cdn.fs.neo.org has address 207.154.194.79
sergio@kiki:~$ host cdn.fs.neo.org
cdn.fs.neo.org has address 207.154.194.79

kiki is in Frankfurt, lily is in Singapore. On both requests DNS server responds with kiki's IP.

What you expected to happen:
When I request cdn.fs.neo.org from these servers, I expect that the DNS responds with the server's IP (from kiki with 207.154.194.79, from lily with 167.71.206.254).

Environment:
The version of CoreDNS: b668b7f8981d67902080b5a961e7ae8a8ff2b461
Corefile

cdn.fs.neo.org:53 {
    whoami
    log
    debug
    file zones/cdn.fs.neo.org
    cache 3600
    health :8080
    geodns /var/lib/GeoIP/
    #nns https://rpc1.morph.fs.neo.org:40341

}

zones/cdn.fs.neo.org

$ORIGIN cdn.fs.neo.org.
$TTL 3600
@ 3600 IN       SOA ns1.fs.neo.org. ns2.fs.neo.org. 2017042745 7200 3600 1209600 3600
cdn.fs.neo.org.  IN  NS      ns1.fs.neo.org.
cdn.fs.neo.org.  IN  NS      ns2.fs.neo.org.
cdn.fs.neo.org.  IN  A       207.154.194.79
cdn.fs.neo.org.  IN  A       167.71.206.254
cdn.fs.neo.org.  IN  AAAA    fe80::8e8:7eff:fef1:1207
cdn.fs.neo.org.  IN  AAAA    fe80::8da:87ff:fe24:7d6b
www              IN  CNAME   cdn.fs.neo.org.

Logs on request to DNS server from office (92.255.97.106 is the office's public IP)

окт 22 15:50:14 moro coredns[284885]: [WARNING] plugin/geodns: couldn't get location 92.255.97.106 from db: not found
окт 22 15:50:14 moro coredns[284885]: [INFO] 92.255.97.106:39358 - 52001 "A IN cdn.fs.neo.org. udp 32 false 512" NOERROR qr,aa,rd 176 0.000197227s
окт 22 15:50:14 moro coredns[284885]: [WARNING] plugin/geodns: couldn't get location 92.255.97.106 from db: not found
окт 22 15:50:14 moro coredns[284885]: [INFO] 92.255.97.106:38475 - 14401 "AAAA IN cdn.fs.neo.org. udp 32 false 512" NOERROR qr,aa,rd 200 0.000261954s
окт 22 15:50:14 moro coredns[284885]: [DEBUG] plugin/geodns: unsupported type MX, nothing to do
окт 22 15:50:14 moro coredns[284885]: [INFO] 92.255.97.106:48568 - 21035 "MX IN cdn.fs.neo.org. udp 32 false 512" NOERROR qr,aa,rd 110 0.000141053s

окт 22 15:51:25 moro coredns[284885]: [WARNING] plugin/geodns: couldn't get location 199.247.0.222 from db: not found
окт 22 15:51:25 moro coredns[284885]: [INFO] 199.247.0.222:48404 - 51282 "A IN cdn.fs.neo.org. udp 55 false 4096" NOERROR qr,aa,rd 176 0.001178447s

Support mapping dns domain to nns domain

Need to add a new param to NNS plugin config in order to change the domain of request (e.g. from containers.testnet.fs.neo.org to containers).

Example old config:

containers.testnet.fs.neo.org:53 {
    nns https://rpc1.morph.fs.neo.org:40341
}

Example new config:

containers.testnet.fs.neo.org:53 {
    nns https://rpc1.morph.fs.neo.org:40341 containers
}

So request nicename.containers.testnet.fs.neo.org to coredns will transform to request nicename.containers to NNS contract.

invalid argument for ipv6 addr

Nov 23 09:59:27 san coredns[57145]: [DEBUG] plugin/geodns: Get "http://[fe80::8da:87ff:fe24:7d6b]:80": dial tcp [fe80::8da:87ff:fe24:7d6b]:80: connect: invalid argument
Nov 23 09:59:27 san coredns[57145]: [DEBUG] plugin/geodns: Get "http://[fe80::8e8:7eff:fef1:1207]:80": dial tcp [fe80::8e8:7eff:fef1:1207]:80: connect: invalid argument

geodns plugin

We need to implement geodns functionlity.

First we should support at least (NNS compatible records) and determining exact min distance server (geodns support weighted servers and more 5% minimal distance)

WARN log on unavailable edge server

What would you like to be added:
When edge server request fails on failed healthcheck, I'd like to see a log message of level WARN formatted like below:

tried to resolve the <hostname>, healthchecked <IP>:<port>, healthcheck failed, no answer returned

Why is this needed:
For better troubleshooting when deploying DNS server by operations team

Multiple paths to GeoIP databases

What would you like to be added:

I'd like to have an ability to specify multiple GeoIP databases or a path to the directory with these databases.

Why is this needed:

There are many GeoIP databases (with cities, countries, ASNs, etc) and I need all of them in DNS server configuration.

Zone transfer support

We should add transfer support (e.g. axfr request using dig). It can be done using built-in transfer plugin but it must be supported in nns contract first (so issue is blocked by this).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.