Files
system-design-101/data/guides/4-ways-netflix-uses-caching-to-hold-user-attention.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

1.9 KiB
Raw Blame History

title, description, image, createdAt, draft, categories, tags
title description image createdAt draft categories tags
4 Ways Netflix Uses Caching Explore how Netflix uses caching to maintain user engagement. https://assets.bytebytego.com/diagrams/0007-4-ways-netflix-uses-caching.png 2024-02-25 false
real-world-case-studies
Caching
Netflix

The goal of Netflix is to keep you streaming for as long as possible. But a users typical attention span is just 90 seconds.

They use EVCache (a distributed key-value store) to reduce latency so that the users dont lose interest.

However, EVCache has multiple use cases at Netflix.

  • Lookaside Cache

    When the application needs some data, it first tries the EVCache client and if the data is not in the cache, it goes to the backend service and the Cassandra database to fetch the data.

    The service also keeps the cache updated for future requests.

  • Transient Data Store

    Netflix uses EVCache to keep track of transient data such as playback session information.

    One application service might start the session while the other may update the session followed by a session closure at the very end.

  • Primary Store

    Netflix runs large-scale pre-compute systems every night to compute a brand-new home page for every profile of every user based on watch history and recommendations.

    All of that data is written into the EVCache cluster from where the online services read the data and build the homepage.

  • High Volume Data

    Netflix has data that has a high volume of access and also needs to be highly available. For example, UI strings and translations that are shown on the Netflix home page.

    A separate process asynchronously computes and publishes the UI string to EVCache from where the application can read it with low latency and high availability.