System Design Interview: Design Netflix

preview_player
Показать описание

Watch our mock system design interview. Angie asks Andreas a question on how to design typeahead for a search box.

Chapters -
00:00:00 - Introduction
00:00:39 - Question
00:00:47 - Clarifying questions
00:04:22 - Data types
00:10:06 - Design
00:24:27 - Interview analysis

Watch more videos here:

ABOUT US:
Did you enjoy this video? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others.

Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!

#systemdesign #netflix #software #engineeringmanagement #tech #entrepreneurship #exponent #tpm
Рекомендации по теме
Комментарии
Автор

I feel like this isn’t realistic. The interviewer doesn’t really push back with any alternatives and the interviewee just hand waves over these topics.

mr.mystiks
Автор

Netflix supports 6-8 bitrates for videos via the DASH protocol. They can switch bitrates every 2-5s. They keep up to 5m of video buffered in the playback device. The size of the videos varies from 256 kbps and increases by a factor of sqrt(2) for each higher bitrate video, i.e. 256 kbps - 3 mbps (1080p), or 15 mbps (4k).

dgillies
Автор

Very interesting! What I'd also talk about - sharding user metadata via region, having different PostgreSQL instances and Redis instances available in different regions serving these specific regions.

Автор

I am not satisfied with this content. The explanations can be a bit more detailed. For example, the answer to the question "Why should we use Postgres instead of NoSQL" was not thorough. And the interviewer could ask more detailed questions like, "Why Postgres amongst other RDBMS?", "Why do you think the shard size should be around 1 to 10 TB", "How many replicas should we have and why?", "Shouldn't we use a NoSQL storing for user activity to feed the recommendation engine, because the write rate will be very high? " etc.

The interview should be challenging the interviewee so that we can learn more.

fatihpy
Автор

most of the system design was focused on storing videos which interviewer clearly mentionwd is not the focus. main requirement is around user activities and recommendation engine.

gautam
Автор

The choice to pick POSTGRES for User Data was not entirely correct especially given such a system's main requierment : scalability. Netflix moved away from SQL to NOSQL a long time ago:
- Consistency is not as important as availability : Netflix is not a banking application so this is a huge factor. ACID is also not as important.
- Normalization is not that complex in systems like Netflix. They're not OLTP apps like banking apps. NOSQL scale immensely with static models that dont change much
- If models DO requier that rare change -> SQL involves some sort of downtime. NOSQL has a distinct advantage here. (This was cited as one of the reasons for moving away from SQL)

damienspectre
Автор

Quick advise : Using CDNs to serve your premium content can compromise the security of your platform. Remember CDNs are typical for static public content that you don’t care to keep confidential and that they don’t come with authentication out of the box but you have to arrange some knobs to authenticate and authorize.

SubtleAsh-TheImmortal
Автор

At the beginning of the interview, didn’t the interviewer specifically ask “only” for the design of a recommendation engine?

Seems like the interviewee was attempting to design Netflix as a whole - considering he was talking about BLOB storage for videos, etc.

ranesh
Автор

I found the reasoning for using a blob store vs. any source very weak. He could have said it's a distributed storage system.

paneerlovr
Автор

The static video data can be placed on a CDN too.

arunavkhare
Автор

How is this interviewee so calm and not nervous?

mykevinjung
Автор

NoSQL would have been perfect for this use case…the user metadata does not always need to be consistent, it can be eventually consistent.

nagrotte
Автор

completely missed : user watches for 30 minutes, stops and logs off, comes back after few days and want to resume from where he left off :)

amazingabhay
Автор

The interview just agrees on everything, how it's an interview mocking? Could use my cat for this role 🐱

super-ulitka
Автор

I don't like how he structured the problem. No API descriptions and no explanation about the DB columns. Also, sharding based on users without any hashing is a bad idea since it will cause imbalances among the shards.

mobkzeb
Автор

One thing I'm thinking about... does caching metadata and video static data help that much with low latency? Cuz I thought the main latency comes from the video content itself so talking about video chunking and definition is important.

nicholasli
Автор

Quite a beginner level system design interview, could've covered things like how to ensure fast videos globally, how to handle sudden peak when popular shows are launched, how to ensure high availability

KeraStarcraft
Автор

isnt usermetadata 20 gb and not 20 tb?

abdurrazzak
Автор

The static content is so static it could even be served from web servers, which you could distribute worldwide via CDN for faster browsing in remote countries. There is no need for transactions since videos listings are created hidden off-line and then materialized at a certain time and date, and later de-materialized at a much later date. Also when there is a popular video it can easily get 10M views in 48 hours. In this case if there is only 1 video per CDN POP you could easily overload the storage servers serving the videos - therefore - when a user goes to play a video that is in very high demand the servers for that video are near capacity, the next serving process should replicate the video to new storage in the same POP of the CDN in order to scale that particular video to meet performance demands. You can do this because most CDNs support customized programs that run in each POP to serve out the content that is requested and this code can initiate the duplication and then hand off the video playback once the duplication is well underway. Netflix started out using AWS to serve its vieeos but they quickly realized the CDN was going to determine profitability (same probably as YouTube had until 2015 - it wasn't profitable) so they moved onto their own CDN in the late 2010's.

dgillies
Автор

What's the system/app used for story boarding in this video?

jatindwin