Successfully reported this slideshow.
Your SlideShare is downloading. ×

High Performance Weibo QCon Beijing 2011

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
微博cache设计谈
微博cache设计谈
Loading in …3
×

Check these out next

1 of 63 Ad

High Performance Weibo QCon Beijing 2011

Download to read offline

Sina Weibo is the most popular Microblogging platform in China. It has more than 100 million user and tens of millions of daily updates. This slide explains the performance challenges in Weibo platform.

Sina Weibo is the most popular Microblogging platform in China. It has more than 100 million user and tens of millions of daily updates. This slide explains the performance challenges in Weibo platform.

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Advertisement

Similar to High Performance Weibo QCon Beijing 2011 (20)

Recently uploaded (20)

Advertisement

High Performance Weibo QCon Beijing 2011

  1. 1. Build High Performance Weibo System @TimYang
  2. 2. • • 140 • •
  3. 3. • QCon 2010 • WDC 2010
  4. 4. Agenda 3 4 2 1
  5. 5. Part 1
  6. 6. ( )
  7. 7. MySQL • •
  8. 8. • hash • • user_timeline index
  9. 9. • • • • 5 •
  10. 10. MySQL + cache • • • cache • •
  11. 11. NoSQL “Databases are specializing – the “one size fits all” approach no longer applies.” MongoDB
  12. 12. NoSQL? • • Redis • MongoDB • • Cassandra
  13. 13. • MongoDB • Redis • HBase • Cassandra
  14. 14. Redis - • • snapshot - • vm - • diskstore - • aof -
  15. 15. Redis - • string: key value redisObject 16 bytes/item • list: 40 bytes / item • hash: zipmap(<64) • set/sorted set
  16. 16. Redis - Replication • rdb •
  17. 17. Redis -
  18. 18. Redis - • • failover • list/set (optional)
  19. 19. • MySQL • NoSQL MySQL cache
  20. 20. Part 2
  21. 21. ( )
  22. 22. → →
  23. 23. Web cache cache •
  24. 24. “Web json cache json ( ) 2~5K , xml 10k , protobuf 500 ”
  25. 25. RDBMS→ Key value (JSON)→ Protocol buffers(binary)
  26. 26. JSON • DB • Cache • Message Queue • API
  27. 27. PB • Numeric: varint, from 1 byte • • Java, C++, Python...
  28. 28. • • cache • “192.168.0.1” → “0xc0a80000” → varint
  29. 29. Benchmark Text Text ( http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking)
  30. 30. “We would like to provide public APIs that accept protocol buffers as well as XML, both because it is more efficient and because we're just going to convert that XML to protocol buffers on our end anyway.” - Google
  31. 31. • • •
  32. 32. “ ”
  33. 33. • LAMP • 1ms •
  34. 34. • MQ stat • MQ Processor stat
  35. 35. ? “1 ”
  36. 36. • Timeline • • • cache
  37. 37. 1. 2. 3. 4. cache master 5. replication
  38. 38. • 5
  39. 39. • 5 •
  40. 40. • 5 • •
  41. 41. • 5 • • •
  42. 42. • RAM is the new disk •
  43. 43. “Percona Server now both SQL and NOSQL HandlerSocket, 100 rps 12cores/24threads and 380GB of RAM, mysql Redis NoSQL ”
  44. 44. @jackbillow “ 1. PK lookup 2. cache ” @kobe “ innodb ” @TimYang “ InnoDB Adaptive Hash Indexes hash ”
  45. 45. • NoSQL • binlog Redis • jbinlog https://github.com/tangfl/jbinlog
  46. 46. Part 3
  47. 47. app
  48. 48. • • • spam • •
  49. 49. Text
  50. 50. • • GZIP •
  51. 51. Part 4
  52. 52. “@ Zheng:“ ” //@ : @bian " " http://t.cn/h0k4r (49)| (15)” 2 14 10:36 (22) | (10)
  53. 53. • •
  54. 54. • • • •
  55. 55. • • • • cache •
  56. 56. • •
  57. 57. Timeline Memcached MySQL Redis
  58. 58. • • RAM •
  59. 59. Q&A @TimYang

Editor's Notes

  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x7EC6;&amp;#x5316;&amp;#x7D22;&amp;#x5F15;&amp;#x62C6;&amp;#x5206;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x6BD4;&amp;#x8F83;&amp;#x56FE;&amp;#x8868;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • json&amp;#x53CA;&amp;#x6027;&amp;#x80FD;&amp;#x5BF9;&amp;#x6BD4;\n
  • \n
  • \n
  • \n
  • &amp;#x76F8;&amp;#x540C;&amp;#x7A7A;&amp;#x95F4;&amp;#xFF0C;5&amp;#x500D;&amp;#x5BB9;&amp;#x91CF;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x589E;&amp;#x52A0;&amp;#x56FE;&amp;#x8868;&amp;#x7B49;&amp;#x63A5;&amp;#x53E3;&amp;#x6210;&amp;#x679C;\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • &amp;#x8FC5;&amp;#x901F;&amp;#x5B9A;&amp;#x4F4D;\n
  • \n
  • \n
  • \n
  • \n

×