Sunday 3 January 2016

Design Netflix

1. Cases

Case 1: A user loges in to Netflix
    case sensitive? verification code? forgot password? first time log in?
Case 2: A user searches Netflix
    search by keywords, search by time, search by players, search by catalog.
Case 3: A user plays a movie
    pause, faster, skip the beginning, full screen.
Case 4: A user writes a comment
    comment format? remove comments?
Case 5: A user pays his/her subscription fees
    security

2. Constraints

2015 Oct: 69.17 million subscribers ~ 70 million

Active Users in Peak Time:
70 million * 30 minutes / (24 * 60) * 10 [Peak] = 14.6 million

Active Traffic Requirement in Peak Time:
14.6 million * 200,000 Byte/s = 2.92 TB/s

Storage (minimum):
Movie: 500,000 * 1 GB = 500 TB
Comments: 70 million * 1000 * 1000 Byte: 70 TB

3. Service

User Account Service

Movie & Catalog Service

Comment & Recommendation Service

4. Data

User Account Data
MySQL or PostgreSQL

Movie & Catalog Service
Files & Mongodb (Flexible Schema)

Comment & Recommendation Service
Mongodb (Large Data Size)

5. All Together

No comments:

Post a Comment