9. Push(Figure)
User A
UpdateAction
Followers of User A
= 1, 2, 3
Inbox Inbox Inbox
(Append to 1’s (Append to 2’s (Append to 3’s
home timeline) home timeline) home timeline)
12. Pull
User I
Get home_timeline
User I’s
Following List
= A, B, C
Outbox Outbox Outbox
(statuses sent by A) (Statuses sent by B) (Statuses sent by C)
35. Read-through and Write-
through
? Products or projects
– MySQL memcached UDF
– Cache money for Ruby on Rails
? Or wrap a proxy for the db
driver, in any language
38. Multiget 问题
When memcached servers are
CPU bound, adding more
memcached servers doesn't
help serve more requests.
- Jeff Rothschild, Vice President of
Technology at Facebook
39. Cache 挑战: multiget
hole
Application
Max RPS of application < (A and B and C)
Multiget
Multiget (keys…)
Multiget
Multiget
Multiget
Memcached Memcached Memcached
(Max RPS: A) (Max RPS: B) (Max RPS C)