Haystack
Haystack is an object-storage design that packs photo records into large volume files and locates them through compact in-memory mappings.
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
Citations
- 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.
- Vajgel, Beaver and Sobel. Needle in a haystack: efficient storage of billions of photos. 30 April 2009.
Sources & caveats
- Historical architecture described in 2009 and 2010; current deployment status is unknown. Source synthesis, not a Haystack execution or benchmark.