aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-11-15 14:14:29 +0000
committerGravatar Chris O'Haver <cohaver@infoblox.com> 2019-11-15 09:14:29 -0500
commit1e3330c12b285de45888942d8dd69c6e4253098e (patch)
tree8960ba3664db82336a8c11ef99746454871215b6
parente1782c46e86908340179fff18def345f166c2826 (diff)
downloadcoredns-1e3330c12b285de45888942d8dd69c6e4253098e.tar.gz
coredns-1e3330c12b285de45888942d8dd69c6e4253098e.tar.zst
coredns-1e3330c12b285de45888942d8dd69c6e4253098e.zip
pkg/fall: add (a lot of) guidance (#3450)
update the pkg doc to talk about various trade off Fixes #2723 Signed-off-by: Miek Gieben <miek@miek.nl>
-rw-r--r--plugin/pkg/fall/fall.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/plugin/pkg/fall/fall.go b/plugin/pkg/fall/fall.go
index c8cdc6ff6..067deb9a6 100644
--- a/plugin/pkg/fall/fall.go
+++ b/plugin/pkg/fall/fall.go
@@ -1,4 +1,16 @@
-// Package fall handles the fallthrough logic used in plugins that support it.
+// Package fall handles the fallthrough logic used in plugins that support it. Be careful when including this
+// functionality in your plugin. Why? In the DNS only 1 source is authoritative for a set of names. Fallthrough
+// breaks this convention by allowing a plugin to query multiple sources, depending on the replies it got sofar.
+//
+// This may cause issues in downstream caches, where different answers for the same query can potentially confuse clients.
+// On the other hand this is a powerful feature that can aid in migration or other edge cases.
+//
+// The take away: be mindful of this and don't blindly assume it's a good feature to have in your plugin.
+//
+// See http://github.com/coredns/coredns/issues/2723 for some discussion on this, which includes this quote:
+//
+// TL;DR: `fallthrough` is indeed risky and hackish, but still a good feature of CoreDNS as it allows to quickly answer boring edge cases.
+//
package fall
import (