sturdyc

Go caching library with stampede protection and request coalescing

Image 1 of 1: P95 latency chart: spiky 10 to 50 ms traffic drops to a flat line near 5 ms

Non-blocking reads and sharded writes, with in-flight tracking, asynchronous early refreshes and refresh coalescing that merges lookups into fewer data source calls. A small API fronts distributed caches, databases and external APIs.

  • >90%Data source load cut

Trade-offs

  • Early refreshes instead of waiting for expiry. Frequently used records never expire, so tail latency stops paying for refreshes, while the background keeps calling the data source.
  • In-memory per container. Reads are fast, but a new container starts at a 0% hit rate, so a 20x traffic spike could become a 200x spike for the data sources.

Q&A2

In-flight tracking, asynchronous refreshes and refresh coalescing cut load on the underlying data sources by more than 90%, which allowed fewer containers and cheaper database clusters.

Reviews

Loading reviews

    More in Performance

    See all 47 →
    • FeOxDBEmbedded key-value store in Rust with write-behind durability
    • blitcpFile copier that reads in disk order, dedupes and streams over raw SSH
    • EntrolyLocal context layer that picks what coding agents send to the model
    • BigMoeOnEdgeEngine that streams MoE experts from flash to run models larger than memory
    • AntirionAI gateway in one Rust binary, with the admin console built in
    • PXALLM server tuned for Tesla P100, V100 and GTX 10-series GPUs

    More in Go

    See all 99 →
    • SupermetryCookie-free web and product analytics on one Go binary and PostgreSQL
    • StreambedPostgres-to-Iceberg CDC engine with a built-in Postgres wire query server
    • OmagenImage-to-theme studio for Omarchy with reversible previews and recovery
    • pistachioDeclarative PostgreSQL schema management with a plan and apply workflow
    • PandaWardLocal application security assessment that reports what it couldn't decide
    • cerberusPrometheus, Loki and Tempo HTTP gateway for ClickHouse