carbon-c-relay icon indicating copy to clipboard operation
carbon-c-relay copied to clipboard

buffering metrics on a disk

Open azhiltsov opened this issue 7 years ago • 5 comments

When relay can't send a metrics out it keeps them in a memory till certain limit. It will be useful to store them on a disk when the memory buffer full. This will give more flexibility for storage reboot/maintenance etc.

azhiltsov avatar May 05 '17 13:05 azhiltsov

Sounds like this would be a bit more thorough rewrite to become memory bound (or a percentage) and try pushing out blocks to disk when exceeding the threshold. It's sort of a 2-stage rocket, where one overflows into the other, which may be too slow to handle, so drop metrics, like the current 1-stage rocket does.

grobian avatar May 05 '17 17:05 grobian

The disk write will be linear, so even spinning disk should handle it fine.

azhiltsov avatar May 05 '17 21:05 azhiltsov

@grobian we also encounter this issue frequently. During a cluster member downtime, the relay can't contain all of the pending metrics in memory (even after tuning) - there is simply too much to hold.

Do you know of any approach we may use to counteract this? Could we have the "file" cluster act as a backup of sorts?

xneo64 avatar Oct 12 '17 13:10 xneo64

carbon-c-relay is more of a router than a cache, a failover target could maybe do what you need.

grobian avatar Oct 13 '17 07:10 grobian

@xneo64 you may use our version of grafsy https://github.com/tantra35/grafsy for this purposes

tantra35 avatar Jan 03 '18 12:01 tantra35