nspcc-dev / coredns Goto Github PK
View Code? Open in Web Editor NEWThis project forked from coredns/coredns
CoreDNS is a DNS server that chains plugins
Home Page: https://coredns.io
License: Apache License 2.0
This project forked from coredns/coredns
CoreDNS is a DNS server that chains plugins
Home Page: https://coredns.io
License: Apache License 2.0
We should create separate neofs-health
plugin (that uses healht logic from geodns
plugin).
One NNS in mainnet (higher priority) and one in sidechain. Merge result.
Support SRV record in NNS plugin after nspcc-dev/neofs-contract#254
The plugin should allow to set the following params:
Workflow:
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.
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
After #20 add an other way to set filter for record names -- regexp.
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.
After #20 add other methods to check health (not only via http request, but i.e. icmp_ping)
What would you like to be added:
NNS plugin support.
We should use grpc first
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
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)
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
Version which should be tested: 3ca07a4 (last commit of master branch)
How to configure: https://github.com/nspcc-dev/coredns/blob/master/plugin/healthchecker/README.md
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.
Current implementation is targeted for sidechain where NNS contract is deployed with ID:1
Line 40 in 5ee718f
As for NNS contracts in mainchain, we should support optional contract address configuration.
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).
It would be nice to update neo-go to v0.99.3 and replace deprecated code. https://github.com/nspcc-dev/neo-go/releases/tag/v0.99.3
But probably there is some problem with go version 1.16 in go.mod
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.