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

并且要:根據(jù)A需求,我們要用B來handle。
例子:根據(jù)有大量read tweets,我們要用separate servers來handle。

Step 6: Detailed design

選一兩個dig deeper。根據(jù)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?
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,840評論 0 10
  • iOS10上運行應用若未在plist配置相應的權限,應用會閃退,相應權限去下: NSPhotoLibraryUsa...
    微笑了閱讀 127評論 0 0
  • 主題:昨天晚上公司聚餐沒回家吃晚餐,回家看見小寶的飯沒吃,想要了解情況 理性目標:了解小寶昨天晚上沒有吃晚飯的原因...
    面包公主閱讀 291評論 0 0
  • 第二章 早晨.房間內: 一位頭上頂著一個雞窩頭的少女正還在呼呼大睡...... 突然 一陣美妙的鈴聲傳入了耳朵 “...
    林北念閱讀 265評論 0 0
  • 文/逗逗 圖/花瓣網(wǎng) 好像還沒反應過來,時間都不夠用了,上半年結束得太匆忙,下半年的時間只剩下5個月,如果再不努...
    遇見逗逗閱讀 269評論 2 3

友情鏈接更多精彩內容