What Database Does Netflix Use? SQL and NoSQL at Netflix
Netflix does not run one database. Most of the streaming path runs on Apache Cassandra, a NoSQL wide-column store. SQL is still there: MySQL for transactional records, CockroachDB where several regions need strong consistency, and Presto or Spark SQL for analytics.
So the short answer to "what SQL does Netflix use" has two halves. Online, the SQL engine is mostly MySQL. For analysis, thousands of people write SQL against a data lake.
A data lake is a large set of files in object storage that query engines read as if they were tables.
The stores Netflix uses and what each one is for
| Job | Store | Type |
|---|---|---|
| Viewing history, profiles, most online data | Apache Cassandra | NoSQL wide-column |
| Caching in front of those stores | EVCache, built on memcached | In-memory cache |
| Billing and other transactional records | MySQL | Relational SQL |
| Data that needs strong consistency across regions | CockroachDB | Distributed SQL |
| Video files and data lake files | Amazon S3 | Object storage |
| Search and log queries | Elasticsearch | Search index |
| Analytics over the data lake | Presto and Spark SQL on Apache Iceberg | SQL query engines |
Apache Iceberg is worth knowing. Netflix engineers built it and gave it to the Apache Software Foundation. It is a table format that lets SQL engines treat files in object storage as real tables, with schema changes and time travel.
Why Cassandra carries the streaming path
The read pattern on the streaming path is a key lookup. Give me this member's profile. Give me this title's metadata. Give me where this person stopped watching.
Joins are rare, and the same few queries run billions of times. That is the shape Cassandra was built for.
Three properties matter here:
- No single leader. Every node can take a write, so one failed node does not stop writes.
- Replication across regions. Copies sit near the members who read them.
- Tunable consistency. Each query chooses how many replicas must answer.
Netflix trades strict consistency for availability on most of this data. A watch position that is one second stale is not a problem. A playback screen that will not load is.
Why SQL is still part of the design
Two jobs still want a relational database.
The first is money. Billing and subscription records need multi-row transactions and strict correctness. MySQL gives that, and Netflix has written publicly about running billing on it.
The second is analysis. Thousands of analysts, data scientists, and engineers query Netflix data. SQL is the language they all share, so the data lake exposes SQL through Presto and Spark.
CockroachDB sits between the two. It speaks SQL and keeps strong consistency, but it spreads data across regions like a NoSQL store.
SQL or NoSQL for a streaming service
Interviewers ask you to compare the two for exactly this system. Answer by workload, not by preference.
| Question about the data | Points to SQL | Points to NoSQL |
|---|---|---|
| Do you need multi-row transactions? | Yes | No |
| Is access a simple key lookup? | No | Yes |
| Does the write rate exceed one machine? | Harder to do | Designed for it |
| Is the schema stable? | Yes | It changes often |
| Will people query it by hand? | Yes | Rarely |
| Is stale data acceptable for a moment? | No | Yes |
Every large system uses both. The real question is which store holds which data, so map each data type to a store and give a reason for each choice.
A good answer for a streaming service looks like this. Put video files in object storage behind a CDN. Put catalog metadata in a relational store with a heavy cache. Put viewing history and watch position in a wide-column store. Put billing in a transactional SQL database. Send events to a stream for analytics.
How to Prepare
- Learn the trade-off properly. Grokking System Design Fundamentals covers replication, consistency, and caching in one place.
- Practice the full design. Work through designing a Netflix-like streaming service and choose a store for every data type.
- Study the rest of the stack. Read which backend Netflix uses and which API gateway Netflix uses.
- Rehearse the comparison out loud. Grokking the System Design Interview has the question formats that interviewers actually use.
- Never answer with a product name alone. Name the store, then give the workload reason right after it.

GET YOUR FREE
Coding Questions Catalog

$123

$197

$72