coredns / rrl

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

Track balance with float #5

Closed chrisohaver closed 5 years ago

chrisohaver commented 5 years ago

Track balance with float to avoid cumulative rounding error with ints. Store allowances and window as floats so we don't need to cast back and forth between int and float in the serving path.