Week 2 July 14 ~ July 20

Step by Step

A/C: 看Doc 理解各个步骤的真正含义,summarize & 简短总结成关键词 so that可以在每个system里面套用
ETA 8号

TinyURL

A/C: TBD
ETA 10号

Pastebin

A/C: TBD
ETA 12号


System Design Interviews: A step by step guide

Step 1: Requirements clarifications

搞清楚:
包含哪些功能
包不包括video or photos
only focus on the back-end or both back-end and front-end?

Step 2: System interface definition

目的:
establish the exact contract expected from the system
确保requirements 理解正确

Step 3: Back-of-the-envelope estimation(粗略估计)

问问题 --> estimate ==> will help (later) scaling, LB and caching.

问题example:

  • scale (如多少tweets posted, 多少tweets viewed, 多少timeline generation等)
  • 多大storage
  • network bandwidth --> decide how to manage traffic and balance load among servers

Step 4: Defining data model

identify various entities of the system
--> NoSQL or SQL
What kind of block storage should we use to store photos and videos?

Step 5: High-level design

画block diagram with 5~6 boxes 来表示system的components

Twitter example:


high-level components

并且要:根据A需求,我们要用B来handle。
例子:根据有大量read tweets,我们要用separate servers来handle。

Step 6: Detailed design

选一两个dig deeper。根据interviewer 的feedback 详细解释哪一部分。

应该always提供不同的approches,并且比较他们的pros and cons,并说为什么最后选择这种。考虑tradeoff。

可能涉及:

  • database partition
  • handle hot user
  • optimize (LB, cache, etc.)

Step 7: Identifying and resolving bottlenecks

讨论bottlenect,越多越好,并提供不同approches to mitigate them

  • single point failure(single point failure impacts the whole system) (failover?)
  • replica?
  • monitoring & alerts for performance?
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,449评论 0 10
  • iOS10上运行应用若未在plist配置相应的权限,应用会闪退,相应权限去下: NSPhotoLibraryUsa...
    微笑了阅读 109评论 0 0
  • 主题:昨天晚上公司聚餐没回家吃晚餐,回家看见小宝的饭没吃,想要了解情况 理性目标:了解小宝昨天晚上没有吃晚饭的原因...
    面包公主阅读 267评论 0 0
  • 第二章 早晨.房间内: 一位头上顶着一个鸡窝头的少女正还在呼呼大睡...... 突然 一阵美妙的铃声传入了耳朵 “...
    林北念阅读 243评论 0 0
  • 文/逗逗 图/花瓣网 好像还没反应过来,时间都不够用了,上半年结束得太匆忙,下半年的时间只剩下5个月,如果再不努...
    遇见逗逗阅读 238评论 2 3