2017-01-31 12:25:02 -05:00
|
|
|
// generated by directives_generate.go; DO NOT EDIT
|
2017-02-22 07:25:58 +00:00
|
|
|
|
2017-01-31 12:25:02 -05:00
|
|
|
package dnsserver
|
|
|
|
|
|
|
|
|
|
// Directives are registered in the order they should be
|
|
|
|
|
// executed.
|
|
|
|
|
//
|
2017-09-14 09:36:06 +01:00
|
|
|
// Ordering is VERY important. Every plugin will
|
|
|
|
|
// feel the effects of all other plugin below
|
2017-01-31 12:25:02 -05:00
|
|
|
// (after) them during a request, but they must not
|
2017-09-14 09:36:06 +01:00
|
|
|
// care what plugin above them are doing.
|
2017-12-15 01:26:36 -06:00
|
|
|
var Directives = []string{
|
2023-12-08 16:50:30 +01:00
|
|
|
"root",
|
2018-06-29 12:44:16 +03:00
|
|
|
"metadata",
|
2021-07-14 08:25:30 +01:00
|
|
|
"geoip",
|
2019-03-29 19:40:23 +00:00
|
|
|
"cancel",
|
2017-03-13 20:24:37 +00:00
|
|
|
"tls",
|
2026-02-11 02:14:05 +01:00
|
|
|
"proxyproto",
|
2025-05-19 03:49:21 +03:00
|
|
|
"quic",
|
2025-12-18 05:08:59 +02:00
|
|
|
"grpc_server",
|
|
|
|
|
"https",
|
|
|
|
|
"https3",
|
2022-12-28 11:14:16 +00:00
|
|
|
"timeouts",
|
2024-11-13 20:40:25 +03:00
|
|
|
"multisocket",
|
2018-03-02 17:17:26 -08:00
|
|
|
"reload",
|
2017-12-04 08:28:27 -08:00
|
|
|
"nsid",
|
2019-11-10 08:10:12 +00:00
|
|
|
"bufsize",
|
2017-02-14 19:23:18 +00:00
|
|
|
"bind",
|
2017-06-13 15:47:17 -07:00
|
|
|
"debug",
|
2017-02-14 19:23:18 +00:00
|
|
|
"trace",
|
2019-03-07 20:35:16 +00:00
|
|
|
"ready",
|
2017-02-14 19:23:18 +00:00
|
|
|
"health",
|
|
|
|
|
"pprof",
|
plugin/shed: add UDP overload protection plugin (#8312)
* plugin/shed: add UDP overload protection plugin
UDP responses written back through one listener socket serialize on the
Go runtime's internal fdMutex, which allows at most 2^20-1 concurrent
operations per file descriptor and panics the process when exceeded.
CoreDNS serves UDP with one goroutine per query, all writing through the
shared packet connection, so a sustained overload parks every excess
in-flight query in that wait queue until the process dies with
"too many concurrent operations on a single file or socket". Observed
in production: ~2.8M goroutines and 60GiB RSS before the panic.
The shed plugin makes the panic structurally unreachable. It installs,
via Config.UDPDecorateWriterFunc, a per-socket bounded evict-oldest
stack drained newest-first by a single writer goroutine, so the fd
never sees more than one writer and residual capacity under overload
always goes to the freshest response. While a socket's stack is full,
arriving queries are dropped before any plugin runs. Drops are silent
(the client's resolver retries elsewhere) and counted in
coredns_shed_dropped_total{server, reason}.
plugin/shed/fdmutex_test.go demonstrates the failure and the fix with
one shared flood harness. Two subprocess tests reproduce the exact
runtime panic without the plugin's write discipline - one deterministic
(a held write plus >2^20 queued writers), one with nothing held or
mocked; both exercise the Go runtime rather than the plugin, so they
are gated behind SHED_FLOOD_TEST=1. The counterfactual - the same load
through the plugin's stack, completing with every response accounted
for as written or dropped - runs in every test invocation, including
-race, at 50k responders, and at the full 1.5M with SHED_FLOOD_TEST=1:
SHED_FLOOD_TEST=1 go test ./plugin/shed/
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
* test: add shed e2e test
Query a shed-enabled server over UDP (the plugin's deferred
single-writer path) and TCP (which shed passes through), and check
that coredns_shed_dropped_total is exported with its reason label.
No-Verification-Needed: test-only change
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
---------
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
2026-07-27 05:13:25 -04:00
|
|
|
"shed",
|
2017-02-14 19:23:18 +00:00
|
|
|
"prometheus",
|
|
|
|
|
"errors",
|
|
|
|
|
"log",
|
2017-07-24 23:12:50 +02:00
|
|
|
"dnstap",
|
2020-11-05 15:02:07 +01:00
|
|
|
"local",
|
2020-03-26 08:42:23 +01:00
|
|
|
"dns64",
|
2019-04-28 11:46:45 +01:00
|
|
|
"any",
|
2017-02-14 19:23:18 +00:00
|
|
|
"chaos",
|
2018-01-11 19:59:56 +01:00
|
|
|
"loadbalance",
|
2022-06-27 15:48:34 -04:00
|
|
|
"tsig",
|
2017-02-14 19:23:18 +00:00
|
|
|
"rewrite",
|
2026-07-14 22:36:06 -07:00
|
|
|
"autopath",
|
2026-03-31 00:43:31 +03:00
|
|
|
"acl",
|
2026-07-14 22:26:49 -07:00
|
|
|
"cache",
|
2021-07-15 10:10:16 +02:00
|
|
|
"header",
|
2017-02-14 19:23:18 +00:00
|
|
|
"dnssec",
|
2021-03-15 20:07:55 +05:30
|
|
|
"minimal",
|
2018-01-08 13:13:25 +00:00
|
|
|
"template",
|
2019-11-01 12:02:43 -04:00
|
|
|
"transfer",
|
2017-06-08 13:48:04 -06:00
|
|
|
"hosts",
|
2018-01-15 09:59:29 -08:00
|
|
|
"route53",
|
2019-08-09 12:40:28 +05:30
|
|
|
"azure",
|
2019-08-18 02:29:09 +05:30
|
|
|
"clouddns",
|
2018-12-14 09:41:51 +00:00
|
|
|
"k8s_external",
|
2017-04-19 16:08:30 -04:00
|
|
|
"kubernetes",
|
2017-02-14 19:23:18 +00:00
|
|
|
"file",
|
|
|
|
|
"auto",
|
|
|
|
|
"secondary",
|
|
|
|
|
"etcd",
|
2018-07-20 19:45:17 +01:00
|
|
|
"loop",
|
2018-01-25 21:59:08 +00:00
|
|
|
"forward",
|
2019-03-23 18:17:07 +00:00
|
|
|
"grpc",
|
2017-02-14 19:23:18 +00:00
|
|
|
"erratic",
|
2017-08-07 03:49:40 -07:00
|
|
|
"whoami",
|
2018-01-25 11:02:51 +00:00
|
|
|
"on",
|
2019-08-29 15:41:59 +01:00
|
|
|
"sign",
|
2022-09-08 14:56:27 -04:00
|
|
|
"view",
|
2025-09-30 18:35:32 +02:00
|
|
|
"nomad",
|
2017-01-31 12:25:02 -05:00
|
|
|
}
|