System Design SNAKE原则 (以NetFlix为例) | Now Now Now
- Daily active user? Ask! eg. 5,000,000
- Predict
- User
- Average Concurrent Users = daily_active_user * average_online_time / daily_seconds
= 5,000,000 * (30*60) / (24*60*60)
= 104,167/s - Peak users = average_concurrent_users * 6 = 625,000/s
- Average Concurrent Users = daily_active_user * average_online_time / daily_seconds
- Traffic
- Video traffic speed = 3mbps
- MAX
- Memory
- Memory per user = 10KB
- MAX daily memory = 5,000,000 * 2 * 10 = 100GB
(T级以内的内存都是可以解的)
- Storage
- Total movie = 14,000
- Movie storage (视频会有不同版本) = total_movie * average_movie_size = 14,000*50GB = 700TB
- User
- 比如用户服务可以用mysql, 查询逻辑强
- 电影文件就用文件存,不用数据库
- Step1: Analyze
- with
- More constrains
- New use cases
- Deeper, more details
- from the views of
- Performance
- Scalability
- Robustness
- with
- According to 面试官, 加深某一部分的设计
Read full article from System Design SNAKE原则 (以NetFlix为例) | Now Now Now
No comments:
Post a Comment