---
title: "Building a Distributed Cache for S3"
description: "ClickHouse Cloud adds a distributed cache that turns the per-node filesystem cache into a shared network service, so every compute node can read hot table data that any other node has fetched."
url: "https://swe.quest/articles/building-a-distributed-cache-for-s3-a80fc6f3eb61cb72"
canonical: "https://clickhouse.com/blog/building-a-distributed-cache-for-s3"
source: "ClickHouse"
published: "2025-05-28"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 19
tags: ["caching","analytics","storage-engines","cloud","performance"]
---

# Building a Distributed Cache for S3

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-05-28, 19 min read, Deep dive. Original: [https://clickhouse.com/blog/building-a-distributed-cache-for-s3](https://clickhouse.com/blog/building-a-distributed-cache-for-s3)

## Summary

ClickHouse Cloud adds a distributed cache that turns the per-node filesystem cache into a shared network service, so every compute node can read hot table data that any other node has fetched. Hot data caching evolved from the OS page cache on local disks, to per-node SSD filesystem caches in front of S3, to this shared layer. Per-node caches went cold whenever nodes were added, replaced or resized, and object storage tail latency (~500 ms) cannot be hidden by parallelism. Intra-zone network latency of 100–250 µs and multi-GB/s throughput make a shared cache feasible, and benchmarks show it beating a self-managed SSD server even from a cold start.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- object storage latency characteristics ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))
- columnar storage basics
- OS page cache ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))

## Keywords

ClickHouse Cloud, Amazon S3, S3 Express One Zone, filesystem cache, distributed cache

## Related posts

- [Observing in style: How Poizon rebuilt its data platform with ClickHouse Enterprise Edition](https://swe.quest/articles/observing-in-style-how-poizon-rebuilt-its-data-platform-with-clickhouse-fd5f014575f8d9e5.md): ClickHouse · 2025-03-31 · Medium · 9 min read · Analytics & OLAP, Observability, Scaling, Cost optimization, Cloud platforms
  Poizon moved its distributed-tracing observability store, which ingests petabytes of trace data daily, from self-hosted single-replica ClickHouse on cloud disks to ClickHouse Enterprise Edition on Alibaba Cloud.
- [Building ClickHouse Cloud From Scratch in a Year](https://swe.quest/articles/building-clickhouse-cloud-from-scratch-in-a-year-f29d54507578a627.md): ClickHouse · 2023-03-16 · Medium · 23 min read · System design, Cloud platforms, Kubernetes, Analytics & OLAP, Multi-tenancy
  ClickHouse Cloud was built in about a year on a "shared everything" architecture: compute and storage are separated, object storage (S3/GCS) is the primary store, and local SSDs handle caching and metadata.
- [ClickHouse Newsletter October 2022: A cloud has arrived](https://swe.quest/articles/clickhouse-newsletter-october-2022-a-cloud-has-arrived-ea3242fdda480e88.md): ClickHouse · 2022-10-13 · Medium · 6 min read · Analytics & OLAP, Performance engineering, Cloud platforms, Vector search
  ClickHouse Cloud entered public beta, storing data on shared object storage reachable by all nodes, so users no longer configure replication, sharding or rebalancing, and storage costs less than on block storage.
- [A Quadrillion Rows across three Clouds: scaling LogHouse](https://swe.quest/articles/a-quadrillion-rows-across-three-clouds-scaling-loghouse-ac5a7813ca827fb9.md): ClickHouse · 2026-06-30 · Medium · 20 min read · Observability, Analytics & OLAP, Scaling, Distributed databases, Storage engines
  LogHouse, ClickHouse Cloud's internal logging platform, has grown to 431 PiB uncompressed (27 PiB on disk) and 1.59 quadrillion rows across 36 cells in 33 geoshards on three clouds, ingesting up to 80 GiB/s and 190M rows/s.
- [Announcing On-Demand Compute: Instant compute for your most intensive workloads](https://swe.quest/articles/announcing-on-demand-compute-instant-compute-for-your-most-intensive-workloads-963fb95d47ae3b96.md): ClickHouse · 2026-09-10 · Easy · 6 min read · Analytics & OLAP, Query engines, Cloud platforms, Scaling
  ClickHouse Cloud On-Demand Compute, now in private preview, lets a query run on a shared pool of ClickHouse workers outside the service's own cluster by setting make\_distributed\_plan and distributed\_plan\_workers\_num.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
