haystack · also Haystack photo store

Haystack

Haystack is an object-storage design that packs photo records into large volume files and locates them through compact in-memory mappings.

Related Observatory article: Read on hesela.com

Layout: A stored record is a needle. Replacing an image appends another needle; the highest offset identifies the latest version only within the same physical volume. [1]

Recovery: The index file accelerates restart but is updated asynchronously. Startup scans trailing needles missing from the index. The paper's index-record Flags field is unused; deletion state is checked in the volume's needle, not refreshed by replaying that index. After restart, reads must inspect the stored delete flag. [1]

Reclamation: Deletion marks a record; compaction copies retained records into a replacement file. Marking deletion alone does not recover its occupied space. [2] During compaction, deletes reach both files; at the final switch, modifications are blocked and files and mappings are swapped atomically. [1]

I/O boundary: Avoiding metadata reads does not guarantee one physical disk operation per image. Extent and RAID boundaries can require more. Count application reads and device operations separately. [1]

Relations

related
Object storage, Bitcask, Key-value separation, LSM compaction, Checksum

Citations

  1. Beaver, Kumar, Li, Sobel and Vajgel. Finding a Needle in Haystack: Facebook's Photo Storage. OSDI 2010, sections 3.4.1-3.4.5 and 3.6.1. (accessed 2026-11-29)
  2. Vajgel, Beaver and Sobel. Needle in a haystack: efficient storage of billions of photos. 30 April 2009. (accessed 2026-11-29)
Sources & caveats
  • Historical architecture described in 2009 and 2010; current deployment status is unknown. Source synthesis, not a Haystack execution or benchmark.

JSON: /data/terms/haystack.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Haystack. Hesela. 2026-11-29. https://hesela.dev/terms/haystack/