Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
大数据时代feed架构 (ArchSummit Beijing 2014)
Next
Download to read offline and view in fullscreen.

139

Share

Download to read offline

微博cache设计谈

Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

微博cache设计谈

  1. 1. cache @TimYang
  2. 2. Agenda • Feed • Cache
  3. 3. • • , status feed •
  4. 4. Feed • feed • Push( ) • Pull( ) •
  5. 5. Push • feed • Inbox: • Outbox: • inbox( ) • Inbox( )
  6. 6. Push • • •
  7. 7. Pull • outbox( ) • Inbox( ) • Online computation
  8. 8. Pull • •
  9. 9. • • •
  10. 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. 11. Cache
  12. 12. cache Weibo cache arch Inbox hot cache Outbox Vector cache Archive cache Social Following Followers users Graph Content Hot cache Total
  13. 13. Inbox • “ ” • cache id list • (hot cache) • get set • redis list/set
  14. 14. Outbox • • id list(e.g. 100) • id LRU
  15. 15. Social Graph cache • Following ids • Followers • • • delete all
  16. 16. Content cache • cache • • • • Open API xml, json...
  17. 17. Cache • •
  18. 18. Update Workflow Update status Content cache Hot Inbox Vector Outbox vector Content cache replication
  19. 19. • outbox hot vector • followers list • inbox
  20. 20. feed Home timeline Workflow home_timeline aggregator Content hot Inbox cache Outbox Vector cache Inbox archive Inbox archive Content cache
  21. 21. feed • inbox cache • • , following • id list feed
  22. 22. cache • • hot keys • • mutex
  23. 23. • Content cache • multi get n feed(n = items/ , e.g. 50) • cache = n * (feed + , e.g. 2k) • 1,000 /
  24. 24. • 1,000 800Mbps •1 8Gbps
  25. 25. • 1G 300~400Mbps • • local cache • •
  26. 26. 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
  27. 27. cache • key memcache • • LRU cache, • Memory storage
  28. 28. mutex • content item cache • db • db • key_mutex key • mutex
  29. 29. • • S2 • S2 •
  30. 30. S2 • Web 2.0 Social • What’s S2 • Social Platform & • Social Applications • www.s2forum.org
  31. 31. • • Sina App Engine • • •
  32. 32. Q&A • email: iso1600@gmail.com • @TimYang
  • tanhaiyuan

    Jun. 24, 2018
  • ssuserf85137

    Dec. 1, 2017
  • shiying_2012

    Sep. 29, 2017
  • chenhb

    Mar. 25, 2017
  • bert82503

    Mar. 2, 2017
  • ssuser1601cb

    Jan. 6, 2017
  • ZijianLiu5

    Sep. 26, 2016
  • huxinbang

    Jul. 28, 2016
  • lezhizhe_net

    Jan. 21, 2016
  • linjinhe

    Dec. 7, 2015
  • duanbingnan

    Nov. 30, 2015
  • xue_dong5437

    Jul. 31, 2015
  • chentaolove

    Jul. 26, 2015
  • xiao7ng

    Jul. 3, 2015
  • anliu2

    Jun. 2, 2015
  • ssuser028a17

    May. 13, 2015
  • changmingyang

    Mar. 21, 2015
  • kaiix

    Jan. 12, 2015
  • hellofire

    Dec. 25, 2014
  • Scorpiuss

    Dec. 7, 2014

Views

Total views

42,468

On Slideshare

0

From embeds

0

Number of embeds

18,821

Actions

Downloads

2,010

Shares

0

Comments

0

Likes

139

×