Skip to content

Instantly share code, notes, and snippets.

@chuanying
Last active December 20, 2015 20:38
Show Gist options
  • Save chuanying/6191215 to your computer and use it in GitHub Desktop.
Save chuanying/6191215 to your computer and use it in GitHub Desktop.
1. 英文很着急, 大家将就着看. 1. 所有题目都是在线的(即对响应时间有要求, 40ms是一个较好的临界值) 1. 所有题目都有Follow up, 那就是根据数据量选择机型, 并估计机器数量 1. 开放式题目, 没有标准答案...

System Design Problems:

  1. Amazon S3

    1. Support one file more than 1TB, how to design the system to meet the requirement?
  2. TinyURL:

    1. We should provide a tinyurl service(two main interface: post long url to get the tinyurl, post tinyurl to get the tinyurl). The tinyurl should be as shorter as possible.
      1. More than 10 billion url in total
      2. More than 100 thousands long url to tinyurl requests per second
      3. More than 1 million tinyurl to long url requests per second
  3. User Rank:

    1. We have 500 million users, each user have a score(range from 0 to 1 million), the score will change all the time (people view pages, upload text...will cause the score change).
    2. When view somebody's profile page, we should display his rank (sort by score). How to design this system?
  4. User Graph Service:

    1. In weibo we have 500 million users, each user follow about 200 users on average, 2000 users at most
    2. given 2 user, say A and B, to return is A following B or not? is B following A or not?
      1. 80 billion request per day
    3. given 1 user, return the following list
      1. 4 billion request per day
    4. how to get user we both follow?
    5. how to get: people A following also follow B (我关注的人也关注他)?
    6. how to design this system, how many machine will be used?
  5. Weibo's feed, how to design?

    1. In weibo we have 500 million users, each user follow about 200 users on average, 2000 users at most
    2. the feed service get the tweet list created by my following users sort by time / by weight?
    3. Hint:
      1. more than 100 million tweets are created per day
      2. more than 2 billion requests to the feed service per day
      3. more than 50 million user attention kaifu lee
      4. In China, a lot of tweet will be deleted....The reason you know!
      5. It's a realtime system, the interface should response in at most 40 ms
      6. Which type of machine you want to use? How many?
  6. Weibo's counter service, how to design?

    1. we have more than 50 billion tweets, each tweets have repost, comment, read counter.
    2. more than 80 billion requests per day
    3. read counter: means how many times does this tweet be viewed?
      1. what about how many user have been viewed this tweet?
    4. Which type of machine you want to use? How many?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment