Your SlideShare is downloading. ×
Tup2 新浪杨卫华
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Tup2 新浪杨卫华

611
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
611
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. cache 1
  • 2. Agenda• Feed• Cache• 2
  • 3. •• , status feed•• 3
  • 4. Feed• feed • Push( ) • Pull( ) • 4
  • 5. Push• feed • Inbox: • Outbox:• inbox( )• Inbox( )• Offline computation 5
  • 6. Push••• 6
  • 7. Pull• outbox( )• Inbox( )• Online computation 7
  • 8. Pull•• 8
  • 9. •• 9
  • 10. Pull cache arch Inbox Page cacheOutbox Vector cache Archive data Social Following Followers users GraphContent Hot cache Total 10
  • 11. Cachememory is the new disk,and disk is the new tape.for "real-time" web applications,and systems that require massive scalability - Jim Gray 11
  • 12. Memcache 12
  • 13. terminology• content cache:• vector cache: feed id list 13
  • 14. content cache• multi get n (n = items/page, e.g. 50)• size = n * length of feed + header (e.g. 2k)• concurrent requests / sec, e.g. 1,000• total = 50 * 2k * 1000 / sec• total = 100M * 8bit = 800Mbps 14
  • 15. 15
  • 16. 1.• 1,000 800Mbps•1 8Gbps • facebook Memcache: 60GB ~ 120GB/s 16
  • 17. 1.• 1G 300~400Mbps• local cache•• 17
  • 18. 2.• gzip• quicklz• lzo• , zhangwei 18
  • 19. 3.•1 100• 100 memcache 10• memcache udp• Throughput/Latency/connections• todo: , zhangwei 19
  • 20. 4.• key memcache • • LRU cache, • Memory storage • 20
  • 21. 5. hot keys• content cache of• create local cache 1. get user_yaochen_local 2. get user_yaochen 1. set user_yaochen_local:value 3. delete all 21
  • 22. 6. mutex• content item cache • db • db• key_mutex key• mutex• mutex 22
  • 23. 6. mutex• 2: cache•• 23
  • 24. 7. value list• vector cache, 100• {1,2,3,4...98,99.100}•• append/prepend• get set 24
  • 25. 8. memcache proxy• proxy• pros• cons 25

×