coredns / rrl

Response Rate Limiting Plugin for CoreDNS
Apache License 2.0
23 stars 21 forks source link

example #20

Closed balboah closed 4 years ago

balboah commented 4 years ago

Hi,

I added this plugin in the end of plugins.cfg and have set

rrl . {
    responses-per-second 1
  }

I was expecting no result when simply running a couple of dig commands simultaneously, but it was all fine. How can I confirm that the plugin works as expected?

chrisohaver commented 4 years ago

I added this plugin in the end of plugins.cfg

rrl needs to be near the top of the plugin.cfg plugin list.

(more precisely, it needs to be positioned before other plugins that can send an answer to the client)

balboah commented 4 years ago

Good hint, basically before cache plugin if you're looking at the default list of plugins? However I figured out that I didn't actually query the updated server, so it's all working as I expected even when I have the plugin in the end. Thanks!

chrisohaver commented 4 years ago

Ah - yes, if no plugins in the Corefile provide an answer, then CoreDNS returns a SERVFAIL by default. In that case even if rrl is at the end of the plugin list, limits should be enforced since the entire plugin chain is traversed.

I should update the example in the README to be more practical.