Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
dnsdist: Use LRU to clean the MaxQPSIPRule's store #6726
This makes it possible to remove expired entries from the store without having to scan more than a fraction of it. Entries are ordered by their last usage, with least recently used ones at the front, so we can stop scanning as soon as we find an entry still valid. Even so, we will only consider a fraction of the
This PR also moves the rules definitions to a separate header to make it easier to write unit tests for them (in a separate commit, don't waste too much time reading that one).