streamstack icon indicating copy to clipboard operation
streamstack copied to clipboard

[feature] Disk-backed read and write through cache (EBS or local disk)

Open addu390 opened this issue 3 months ago • 4 comments

Today caching is memory only. That caps how much hot data we can keep close to the node, and cold reads go straight to object storage (higher latency and limited by S3 RPS for massive fanout).

Add a disk tier (EBS volume or local NVMe) that sits between memory and S3:

  • Write through (Optional): data lands on disk on the way to object storage, so recent data is readable locally without an S3 round trip
  • Read through (A need): object fetches from S3 get cached on disk, so repeated reads of the same range are cheap
  • Memory stays the first tier, disk is the second, S3 is the source of truth

Things to figure out:

  • Caching and Eviction policy and a size cap for the disk tier
  • How this interacts with the existing block cache

addu390 avatar Aug 18 '26 04:08 addu390

The BlockCache is already extensible and can easily extend a layer add-on for MemoryBlockCache.

addu390 avatar Aug 23 '26 17:08 addu390

Consider use foyer

shaeqahmed avatar Aug 29 '26 18:08 shaeqahmed

@shaeqahmed Exactly what I had in mind, while looking for a cachelib alternative in rust. And hybrid cache model is a clean fit here, saves much of work to implement an hybrid model.

addu390 avatar Aug 29 '26 20:08 addu390

Use https://nestor.picomq.com/

addu390 avatar Sep 08 '26 03:09 addu390