diff options
author | 2020-02-04 07:59:08 -0500 | |
---|---|---|
committer | 2020-02-04 13:59:08 +0100 | |
commit | 22cd28a7987afc24161b110b550d3e62347d1626 (patch) | |
tree | 13431983c1374533989d34f9af2a4d981786a316 /plugin/forward/metrics.go | |
parent | 8724a134c47b2d86fc20935201a4a8095ff290c4 (diff) | |
download | coredns-22cd28a7987afc24161b110b550d3e62347d1626.tar.gz coredns-22cd28a7987afc24161b110b550d3e62347d1626.tar.zst coredns-22cd28a7987afc24161b110b550d3e62347d1626.zip |
plugins/forward: Add max_concurrent option (#3640)
* count and limit concurrent queries
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* add option
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* return servfail when limit exceeded
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* docs
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* docs
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* docs
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* review feedback
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* move atomic counter to beginning of struct
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* add comment for ErrLimitExceeded
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* rename option to max_concurrent
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* add metric
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* response REFUSED; incl max in error; add more docs
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* avoid err setup race
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* respond SERVFAIL; doc memory usage
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'plugin/forward/metrics.go')
-rw-r--r-- | plugin/forward/metrics.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/forward/metrics.go b/plugin/forward/metrics.go index e120f55fc..d92028d24 100644 --- a/plugin/forward/metrics.go +++ b/plugin/forward/metrics.go @@ -45,4 +45,10 @@ var ( Name: "sockets_open", Help: "Gauge of open sockets per upstream.", }, []string{"to"}) + MaxConcurrentRejectCount = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: plugin.Namespace, + Subsystem: "forward", + Name: "max_concurrent_reject_count_total", + Help: "Counter of the number of queries rejected because the concurrent queries were at maximum.", + }) ) |