Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Slack Engineering 6 min read Case study mediumAdept

Astra Dynamic Chunks: How We Saved by Redesigning a Key Part of Astra

Slack's Astra log search engine replaced fixed-size chunk slots on cache nodes with dynamically sized chunks, because undersized chunks wasted allocated disk space and oversized chunks from recovery tasks could overflow their slots. Cache nodes now advertise disk capacity, and the manager persists chunk-to-node assignments and node metadata in ZooKeeper, using first-fit bin packing to place chunks onto as few nodes as possible. The rollout ran behind a feature flag on one of two data replicas, moving from small clusters to large ones. It cut cache nodes by up to 50% on clusters with many undersized chunks and reduced overall cache node cost by 20%.

Assumes: ZooKeeper coordination basicslog search systems

Related posts

  • ClickHouse Keeper: A ZooKeeper alternative written in C++

    ClickHouse mediumAdept

    ClickHouse Keeper is a C++ drop-in replacement for ZooKeeper with the same client protocol and data model. It adds better snapshot and log compression, no 1 MB node size limit, no ZXID overflow, faster partition recovery, and optional linearizable reads, and it is continuously validated with Jepsen tests. Measurements from loading WikiStat data into a 3-node ClickHouse Cloud service show how cluster size, part-size settings and data volume drive Keeper traffic, about 70% of which is multi-write transactions. A reusable keeper-bench-suite built on EC2, cAdvisor and Prometheus reproduces this workload and finds Keeper uses up to 46x less memory than ZooKeeper with comparable performance.

  • Singapore Meetup Report: How ClickHouse Powers Ahrefs, the World's Most Active Web Crawler

    ClickHouse easyNovice

    Ahrefs moved its web-crawler and analytics storage from a custom system built on Quantcast File System plus Elasticsearch to ClickHouse in 2019. It now runs hundreds of self-hosted ClickHouse hosts with a geo-replicated main cluster, where replicas are dedicated to read-heavy or write-heavy work and tables hold trillions of rows. The team buffers inserts to cut merge work and uses FETCH/ATTACH to move parts between servers. Ahrefs also upstreamed mark compression, which splits marks into blocks with a custom compression scheme and removes mutexes, cutting mark-cache memory by 3-6x.

  • Building high-performance full-text search for object storage

    ClickHouse hardMaster

    ClickHouse redesigned its full-text index for object storage, where per-request latency rather than bandwidth is the bottleneck. The old FST-based dictionary relied on many small random reads, so it was replaced with alphabetically sorted, front-coded dictionary blocks (default 512 tokens) located through a small in-memory sparse index, letting lookups proceed mostly sequentially. Posting lists adapt to size: Roaring bitmaps with per-block min/max row IDs for lists over 12 rows, VarInt arrays for 7–12, and row IDs embedded directly in the dictionary entry for 6 or fewer. Measurements on log and FineWeb datasets back the embedded case: about 90% or more of tokens appear in six or fewer rows. The layout also speeds up part merges, and many queries can be answered from the index alone without reading the text column.

  • From Files to Chunks: Improving HF Storage Efficiency

    Hugging Face mediumAdept

    Hugging Face's Xet team plans to replace file-level Git LFS storage with content-defined chunking (CDC), where a rolling hash over a sliding window sets variable-size chunk boundaries and chunks are deduplicated in a content-addressed store, so edits only upload and store changed chunks. A prior XetHub benchmark on the CORD-19 dataset showed roughly 50% gains, with storage dropping from 8.9 GB to 3.52 GB and download time from 51 to 19 minutes. On two versions of GPT-2's safetensors file, CDC cut total storage by 53%. Fine-tuned models and checkpoints show 30-85% dedup ratios, which could save about 100 TB immediately, and Xet-backed repos are targeted for early 2025.

  • From Chunks to Blocks: Accelerating Uploads and Downloads on the Hub

    Hugging Face mediumAdept

    Hugging Face's Xet storage backend uses content-defined chunking for deduplication but avoids per-chunk overhead by aggregating chunks into content-addressed blocks of up to 64MB and using shards to map files to chunks. That cuts CAS entries roughly 1,000x. A global index over key chunks, a 0.1% subset picked by hash modulo, exploits spatial locality to find shards for deduplication without a network query per chunk. On a 191GB repo of 29 Gemma-2-9B GGUF quantizations, only about 97GB of unique blocks were stored, nearly halving upload time. Local chunk caching also avoids re-downloading unchanged data.

The quest for software engineering knowledge.

Look:
Layout: