• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
杨卫华:微博cache设计浅谈
 

杨卫华:微博cache设计浅谈

on

  • 2,737 views

Downloaded from CSDN download channel. ...

Downloaded from CSDN download channel.

ATTENTION:

This document is NOT the final edition.

You can get the final edition here: http://www.slideshare.net/iso1600/cache-4842490

Statistics

Views

Total Views
2,737
Views on SlideShare
2,737
Embed Views
0

Actions

Likes
19
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    杨卫华:微博cache设计浅谈 杨卫华:微博cache设计浅谈 Presentation Transcript

    • cache 1
    • Agenda • Feed • Cache • 2
    • • • , status feed • • 3
    • Feed • feed • Push( ) • Pull( ) • 4
    • Push • feed • Inbox: • Outbox: • inbox( ) • Inbox( ) • Offline computation 5
    • Push • • • 6
    • Pull • outbox( ) • Inbox( ) • Online computation 7
    • Pull • • 8
    • • • 9
    • Pull cache arch Inbox Page cache Outbox Vector cache Archive data Social Following Followers users Graph Content Hot cache Total 10
    • Cache memory is the new disk, and disk is the new tape. for "real-time" web applications, and systems that require massive scalability - Jim Gray 11
    • Memcache 12
    • terminology • content cache: • vector cache: feed id list 13
    • 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
    • 1. • 1,000 800Mbps •1 8Gbps • facebook Memcache: 60GB ~ 120GB/s 16
    • 1. • 1G 300~400Mbps • local cache • • 17
    • 2. • gzip • quicklz • lzo • , zhangwei 18
    • 3. •1 100 • 100 memcache 10 • memcache udp • Throughput/Latency/connections • todo: , zhangwei 19
    • 4. • key memcache • • LRU cache, • Memory storage • 20
    • 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
    • 6. mutex • content item cache • db • db • key_mutex key • mutex • mutex 22
    • 6. mutex • 2: cache • • 23
    • 7. value list • vector cache, 100 • {1,2,3,4...98,99.100} • • append/prepend • get set 24
    • 8. memcache proxy • proxy • pros • cons 25