注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
总结了一下近期系统设计题:
1. Design Yelp, Point of interests, Nearby Friends (Use Quadtree. This is a read heavy system)
2. Crawler: Crawl by 10k hacked machines with minimum communication between machines, no duplicate crawl, and evenly distribute the load. (A blog explains it in details. )
Below is the framework I summarized:
For design questions, basically you need to follow the software developer life cycle (SDLC).
Basically, most of the system designs are similar. First, understand if the system is
1. read heavy (like news feed, twitter)? Use cache to pre-generate feeds.
2. write heavy (like Dropbox, Google Drive)? Break the large file into smaller chunks, and only upload changed chunks.
3. read-write even (like 1-on-1 chat)
A few key points to scale the system:
1. stateless service for horizontal scale,
2. shard data if one single node can't hold, which also distributes the load
3. use cache to reduce read latency. (80-20 rule: 20% of contents attributes 80% of traffic, which means you only need to cache 20% of data)
4. push vs pull
5. websocket for bidirectional communication (chat system)
A few resources on the web:
For your reference, here is the official doc from FB on how to prepare:
|