Here is the link.
Tech-lead of web foundation team
Facebook in 30 seconds
Rapid change
- Code released twice a day
- Rapid feature development - e.g. Lookback videos
- 450 Gbps of egress
- 720 million videos rendered ( 9 million/ hour)
Proactive design for scaling
Solve scaling problems only once
All Facebook projects in a single source control repo - easy code reuse
Folly: base C++ library
Thrift: RPC
Proxygen: HTT(s) server
RocksDB: persistent key-value store
Efficient synchronization
Producer/Consumer queues
How to implement Producer/Consumer
Multiple wakeups/ Deque
Potential context switches
Word thread ordering
FIFO
LIFO
Good queueing
Deal with a burst of load
Processing speed > arrival speed
Increase reliability
Bad queueing
Server is overloaded
Processing speed < arrival speed
Causes latency
Overload handling philosophy
If you're going to fail, fail quickly - prevents delaying the overall request
Servers should signal overload - OK to say "I can't help you right now"
Order doesn't matter - servers need not first-com-first-serve
Clients should defend themselves - don't rely on the server
complex knobs are tuned poorly - design parameter-free abstractions
Controlled delay
No comments:
Post a Comment