Agent: Optional middleware to rate limit NOTIFYs

Currently, the Agent naively does an AXFR/backend call for every
NOTIFY that it receives. It should be able to get a NOTIFY for a zone,
and then ignore successive NOTIFYs for a time period, and then do the
zone transfer, so as to catch all of the updates that came in.

This middleware accomplishes that by implementing a small locking
dictionary that doesn't allow more than one NOTIFY to kick off AXFR
per zone, per process for a configurable time period.

The Agent gracefully hanldes the situation where it's sleeping on a NOTIFY,
and a DELETE zone come through. When the NOTIFY wakes up, and the zone is already gone,
it refuses the NOTIFY because the domain doesn't exist.

Change-Id: If5655f8da201202482fa8c44af9b1c8496bf3281
This commit is contained in:
Tim Simmons
2015-06-02 16:41:24 +00:00
parent 68780870b3
commit 12b8a4e96f
5 changed files with 149 additions and 0 deletions

View File

@@ -197,6 +197,7 @@ debug = False
#masters = 127.0.0.1:5354
#backend_driver = fake
#transfer_source = None
#notify_delay = 0
#-----------------------