frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Cachey, a Read-Through Cache for S3

https://github.com/s2-streamstore/cachey
1•shikhar•1h ago
Cachey (https://github.com/s2-streamstore/cachey) is an open source read-through cache for S3-compatible object storage.

It is written in Rust with a hybrid memory+disk cache powered by foyer [1], accessed over a simple HTTP API. It runs as a self-contained single-node binary – the idea is to distribute yourself and lean on client-side logic for key affinity and load balancing.

If you are building something heavily reliant on object storage, the need for something like this is likely to come up! A bunch of companies have talked about their approaches to distributed caching atop S3 (such as Clickhouse [2], Turbopuffer [3], WarpStream [4], RisingWave [5]).

Why we built it:

Recent records in s2.dev are owned by a designated process for each stream, and we could return them for reads with minimal latency overhead once they were durable. However this limited our scalability in terms of concurrent readers and throughput, as well as implied cross-zone network costs when the zones of the gateway and stream-owning process did not align.

The source of durability was S3, so there was a path to slurping recently-written data straight from there (older data would already be read directly), and take advantage of free bandwidth. But even S3 has RPS limits [6], and avoiding the latency overhead as much as possible is desirable.

Caching helps reduce S3 operation costs, improves the latency profile, and lifts the scalability ceiling. Now, regardless of whether records are recent or old, our reads always flow through Cachey.

Cachey internals:

- It borrows an idea from OS page caches by mapping every request into a page-aligned range read. This did call for requiring the typically-optional Range header, with an exact byte range. Standard tradeoffs around picking page sizes apply, and we went with fixing it at the high end of S3's recommendation (16 MB). If multiple pages are accessed, some limited intra-request concurrency is used. The sliced data is sent as a streaming response.

- It will coalesce concurrent requests to the same page (another thing an OS page cache will do). This was easy since foyer provides a native 'fetch' API that takes a key and thunk.

- It mitigates the high tail latency of object storage by maintaining latency statistics and making a duplicate request when a configurable quantile is exceeded, picking whichever response becomes available first. Jeff Dean discussed this technique in "The Tail at Scale" [7], and S3 docs also suggest such an approach.

A more niche thing Cachey lets you do is specify more than 1 bucket an object may live on, and attempt up to 2, prioritizing the client's preference blended with its own knowledge of recent operational stats. This is actually something we rely on since we offer regional durability with low latency by ensuring a quorum of zonal S3 express buckets for recently-written data, so the desired range may not exist on an arbitrary one. This capability may end up making sense to reuse for multi-region durability in future, too.

I'd love to hear your feedback and suggestions! Hopefully other projects will also find Cachey to be a useful part of their stack.

[1] https://github.com/foyer-rs/foyer

[2] https://clickhouse.com/blog/building-a-distributed-cache-for...

[3] https://turbopuffer.com/docs/architecture

[4] https://www.warpstream.com/blog/minimizing-s3-api-costs-with...

[5] https://risingwave.com/blog/risingwave-elastic-disk-cache

[6] https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimi...

[7] https://cacm.acm.org/research/the-tail-at-scale/#body-7

Comments

shikhar•1h ago
How we run it:

Auto-scaled Kubernetes deployments, one for each availability zone, currently on m*gd instances which give us local NVMe. The pods are able to easily push GiBps with 1-2 CPUs used — network is the bottleneck so we made it a scaling dimension (thanks KEDA).

On the client side, each gateway process uses kube.rs to watch ready endpoints in the same zone as itself, and frequently polls /stats exposed by Cachey for recent network throughput as a load signal.

To improve hit rates with key affinity, clients use rendezvous hashing for picking a node, with bounded load (https://arxiv.org/abs/1608.01350) – if a node exceeds a predetermined throughput limit, the next choice for the key is picked.

We may move towards consistent hashing – it would be a great problem to have, if we needed so many Cachey pods in a zone that O(n) hashing was meaningful overhead! An advantage with the current approach is it does not suffer from the cascaded overflow problem (https://arxiv.org/abs/1908.08762).

whyandgrowth•1h ago
To be honest: for use as a local cache/S3 accelerator for large files – it’s fine. The API is simple but flexible. The only point is that the documentation is in English, and you need to understand how “hedged fe” works.

Elastic Projections

https://kunimune.blog/2023/12/29/introducing-the-elastic-projections/
1•andsoitis•14s ago•0 comments

2027: Race to AGI Game

https://thoughtwax.com/2027-race-to-agi/
1•3willows•5m ago•0 comments

Camneerg: The Mac Plus Web Server

https://www.spacerogue.net/Camneerg/
1•xk3•8m ago•0 comments

Russian 'YouTube' hides western movies on its front page

https://torrentfreak.com/pirates-hide-uploads-with-morse-code-rutube-hides-movies-on-its-front-pa...
1•gloxkiqcza•8m ago•1 comments

Wu Ming

https://en.wikipedia.org/wiki/Wu_Ming
1•bryanrasmussen•10m ago•0 comments

Gleam is my new obsession

https://ericcodes.io/blog/gleam-my-new-obsession.html
2•todsacerdoti•12m ago•0 comments

When Dementia Steals the Imagination of a Children's Book Writer

https://www.nytimes.com/2025/09/14/magazine/robert-munsch-author-children-books-dementia.html
1•anarbadalov•13m ago•0 comments

Bluetooth 8-Track Adapters Are a Thing (2022)

https://hackaday.com/2022/07/03/bluetooth-8-track-adapters-are-a-thing/
1•Ariarule•13m ago•0 comments

New AI hype "Our language models are so 'conscious' we need to give them rights"

https://garymarcus.substack.com/p/new-adventures-in-ai-hype-our-language
2•bryanrasmussen•14m ago•0 comments

Interactive Latent Flow Visualisation for Any LLM

https://argos-viz.fly.dev/
2•zarathrusta•14m ago•0 comments

Tailscale Systray for Linux

https://tailscale.com/kb/1597/linux-systray
1•jackhalford•15m ago•0 comments

Study finds alarming levels of PFAS in blood of those living near USAF base

https://www.theguardian.com/us-news/2025/aug/23/pfas-air-force-base
2•PaulHoule•17m ago•0 comments

Software Agents work. But only if you do

https://suriya.cc/general/gpt-code/
2•suriya-ganesh•18m ago•0 comments

House Just Passed a Bill Punishing "Politically Motivated" Boycotts of Israel

https://theintercept.com/2025/09/11/israel-boycott-bds-boebert/
3•like_any_other•18m ago•1 comments

Lost $300 due to an API key leak from "vibe coding" – Learn from my mistake

1•liulanggoukk•19m ago•0 comments

Apache HertzBeat Graduates as an Apache Top-Level Project

https://hertzbeat.apache.org/blog/2025/08/24/hertzbeat-graduation/
1•tomsun28•20m ago•0 comments

The Master System Girl: A Console with Cooties?

https://nicole.express/2025/sega-mistress-system.html
1•zdw•20m ago•0 comments

Show HN: Mirenku – local/offline anime tracker

https://mirenku.app
1•Aeturnis•22m ago•0 comments

Show HN: Discover and share things to look forward to

https://lookingforwardto.com
1•oan•23m ago•0 comments

A homeless youth asked a stranger for food

https://www.cnn.com/2025/09/14/us/peter-mutabazi-masiko-foster-dad-cec
1•mooreds•23m ago•0 comments

"Hikaru No Go": The Manga That Brought Go to the Spotlight

https://www.thenerdslist.com/2025/01/hikaru-no-go-manga-that-brought-go-to.html
1•7402•24m ago•0 comments

It's our birthday – so we built everyone this retro game

https://canary.tools/10-year
1•mh_•26m ago•2 comments

Show HN: I made pgdbtemplate to cut PostgreSQL test time by 1.5x using templates

https://github.com/andrei-polukhin/pgdbtemplate
1•andrei-polukhin•27m ago•0 comments

Intel Loses One of Its USB4 / Thunderbolt Linux Driver Maintainers

https://www.phoronix.com/news/USB4-Thunderbolt-Maintainer
1•Bender•29m ago•0 comments

React Native – About the New Architecture

https://reactnative.dev/architecture/landing-page
1•motorest•30m ago•0 comments

Show HN: HumbleOp – A debate platform where every post ends in a one-on-one duel

1•Fra_MadChem•31m ago•0 comments

Phoenix and MD Anderson expand cell therapy safety switches

https://longevity.technology/news/phoenix-and-md-anderson-expand-cell-therapy-safety-switches/
1•Bender•32m ago•0 comments

LLMs Don't Know Their Own Decision Boundaries

https://arxiv.org/abs/2509.09396
1•gidellav•33m ago•0 comments

Pipes: A Meta-Dataset of Machine Learning Pipelines

https://arxiv.org/abs/2509.09512
1•gidellav•33m ago•0 comments

ButterflyQuant: Ultra-low-bit LLM Quantization

https://arxiv.org/abs/2509.09679
2•gidellav•34m ago•0 comments