influxdb/cache_system/src
Marco Neumann 21e8fcad25
feat: rework cache refresh logic (#5886)
* feat: rework cache refresh logic

Instead of issuing a single refresh when a GET request for a cached key
comes in, start a background job (using some efficient logic to not
overload tokio) per key that refreshes the key using some exponential
backoff. The timer is reset a new GET request comes in. This has the
following advantages:

- our backoff logic decorrelates the requests
- the longer a key was not used, the less often it will be updated

All test (esp. integration tests) as adjusted accordingly, mostly to
account for the fact that no extra GET is required to start the refresh
timer.

Closes #5720.

* docs: improve

Co-authored-by: Andrew Lamb <alamb@influxdata.com>

* refactor: simplify rng overwrite

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2022-10-19 16:01:39 +00:00
..
backend feat: rework cache refresh logic (#5886) 2022-10-19 16:01:39 +00:00
cache refactor: use concrete loader type within `CacheDriver` (#5532) 2022-09-02 11:30:47 +00:00
loader refactor: use concrete loader type within `CacheDriver` (#5532) 2022-09-02 11:30:47 +00:00
addressable_heap.rs refactor: avoid double-hash when updating addressable heap orders (#5577) 2022-09-08 11:50:55 +00:00
lib.rs style: add no todo!() or dbg!() lints 2022-09-29 13:10:07 +02:00
resource_consumption.rs refactor: do not always box `FunctionEstimator` function (#5568) 2022-09-06 12:09:50 +00:00