Professional Documents
Culture Documents
organization
classical organization
NFS based Design
NFS
6 5
7 4
3
Browser CDN
8
what is the metadata
• file size
• user ID (owner)
• group ID
• number of hard-links
NFS
6 5
7 4
3
Facebook Browser CDN
7 4
3
Browser CDN
Facebook
8
80
1000
Cumulative % of accesses
600
40
400
20
200
0 0
0 200 400 600 800 1000 1200 1400 1600 4/19 4/20
Age (in days)
NFS
6 5
7 4
metadata
NFS
6 5
7 4
reads
the inode: pointers, pointers
everywhere…
a single inode is hundreds of bytes loooong
a single inode is hundreds of bytes loooong
AND
AND
AND
15 B photos 65 B photos
total 60 B images 260 B images
1.5 PB 20 PB
story of a single access: the
metadata NFSand disk reads
based Design
NFS
• NAS couldn’t cache it 6 5
7 4
7 4
AND 8
• caching is expensive
NFS
6 5
7 4
3
Browser CDN
8
Browser CDN
new approach
Web Haystack
Server Cache
Browser CDN
the directory
stores info in replicated database, PHP interface
•
Haystack based Design
• maps logical to physical volumes (3 haystacks on 3 Haystack Store
nodes per logical volume) Haystack
Directory
• key = photo ID
• bridge between CDN (browser) & store
• caching policy: Web Haystack
Server Cache
• request coming directly from browser (CDN
miss mostly cache miss too) &
• photo fetched from a write-enabled machine
CDN
• shelter write-enabled stores from Browser
of photos
• locate a photo within store: Web Haystack
Server Cache
Superblock
Key
Needle 1 index record
Alternate Key
Flags
Needle 2 index record
Offset
reads 2 3
7 8
• http://<CDN>/<Cache>/<machine ID>/ 6 9
1 4
<logical vol. ID, photo ID, cookie>
5
Browser CDN
10
handling operations within
haystack
Haystack based Design – Photo Download
Haystack Store
Haystack
Directory
reads:
2 3
7 8
2 3
4
writes
Web Haystack
Server Cache
2 3
4
writes
Web Haystack
Server Cache
Store Servers:
1 5
writes 2 3
CDN
• append the index record to the index Browser
Store Servers: 4
Web Haystack
Server
• append the image to the haystack file Cache
deletes
compaction