newrelic / nri-varnish

New Relic Varnish Integration
MIT License
3 stars 9 forks source link

Ephemeral backends produce high IO consumption. #43

Closed gsanchezgavier closed 2 years ago

gsanchezgavier commented 2 years ago

Description

The integration is currently creating entities per backends and the PRATE metrics type are calculated based on stored values for these metrics associated to each entity. When the integration runs in environments with ephemeral backends the number of stored metrics increase until the files gets deleted if the integration execution interval exceeds the TTL.

Since in a normal the TTL should not be exceeded so the storer file are not going to be garbage collected. This behavior can lead to the storer file increase it size after each execution of the integration (when new backends are collected) leading to high use of I/O (integration maps that file into the memory at execution time) and disk footprint.

Expected Behavior

Ideally the storer should manage TTL at metric level so if the entity metrics are not being updated that gets deleted.

Additional context

Additional info in this ticket