consul/agent/cache
Pierre Souchay 678489d9d1 Added ratelimit to handle throtling cache (#8226)
This implements a solution for #7863

It does:

    Add a new config cache.entry_fetch_rate to limit the number of calls/s for a given cache entry, default value = rate.Inf
    Add cache.entry_fetch_max_burst size of rate limit (default value = 2)

The new configuration now supports the following syntax for instance to allow 1 query every 3s:

    command line HCL: -hcl 'cache = { entry_fetch_rate = 0.333}'
    in JSON

{
  "cache": {
    "entry_fetch_rate": 0.333
  }
}
2020-07-27 21:11:42 +00:00
..
cache.go Added ratelimit to handle throtling cache (#8226) 2020-07-27 21:11:42 +00:00
cache_test.go Disable background cache refresh for Connect Leaf Certs 2020-07-21 13:51:18 -04:00
entry.go Added ratelimit to handle throtling cache (#8226) 2020-07-27 21:11:42 +00:00
entry_test.go agent/cache: unit tests for ExpiryHeap, found a bug! 2018-06-14 09:42:03 -07:00
mock_Request.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
mock_Type.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
request.go Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
testing.go Added ratelimit to handle throtling cache (#8226) 2020-07-27 21:11:42 +00:00
type.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
watch.go Make the Agent Cache more Context aware (#8092) 2020-06-15 15:43:32 +00:00
watch_test.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00