Inside Netflix’s Streaming Technology

Every month I teach a Tech Term You Should Know (TTYSK) and a tech essay to level up your technical literacy and collaborate well with dev teams. Ask me anything and I'll cover it in an upcoming issue.

This issue's TTYSK is "Runtime Error". Scroll to end to learn more 👇

Inside Netflix’s Streaming Technology

Netflix is a streaming giant with over 232.5 million subscribers worldwide. But what really keeps it running smoothly?

At its core, Netflix’s tech stack is a blend of reliable technologies and the latest innovations. Imagine handling billions of requests daily and personalizing content for millions of users—all while ensuring top-notch streaming quality. Sounds intense, right? But Netflix’s tech stack does just that.

When a user selects a movie, the frontend tech stack, designed to visualize content for web or mobile users, sends an API request to the backend. The backend processes these requests and coordinates content delivery through streaming services, ensuring smooth video streaming to the user. Additionally, data generated from these interactions is stored and processed for continuous service improvement.

Before we dive into Netflix’s tech stack, let’s take a quick look at what a tech stack is and why it’s crucial tech knowledge for you to know.

What’s a Tech Stack anyway?

Think of a tech stack as the backbone of any app. It’s a combination of programming languages, frameworks, libraries, tools, and technologies that come together to build and run an app. Essentially, a tech stack represents the specific set of technologies used to create and operate a software application.

To help you understand the different components that make up a tech stack, let’s break down the essential layers, starting from the user interface and moving deeper into the system:

  1. Frontend (Client-side): This is what users see and interact with. It includes technologies like HTML, CSS, JavaScript, and UI frameworks such as React, Angular, and Vue.js.

  2. Web Server: The web server handles HTTP requests and serves web pages to clients. Technologies used include Apache HTTP Server, Nginx, and Microsoft IIS.

  3. Backend (Server-side): This is where the app’s logic runs. It includes programming languages like Java, Python, Node.js, and tools that handle requests from the frontend. The backend manages the app’s business logic and databases.

  4. Database: This stores all the app’s data, like user profiles and product info. Common databases include MySQL, MongoDB, and PostgreSQL.

  5. Operating System (OS): The OS manages hardware and software services. Popular choices include Linux, Windows, and macOS.

  6. Deployment & Infrastructure: This involves the tools needed to deploy, host, and manage the app. This includes cloud platforms like AWS, and containerization technologies like Docker and Kubernetes.

Spotlight: Netflix's Tech Stack

Now, let’s shine a light on Netflix’s tech stack. Understanding their setup can give you some valuable insights and maybe even inspire your projects.

  • Frontend:

    • Mobile: Netflix uses Swift for iOS and Kotlin for Android to build their mobile apps.

    • Web: For web applications, Netflix uses React for a fast and interactive user interface.

    • API: They use GraphQL to improve communication between the frontend and backend.

  • Backend:

    • Servers: Netflix uses Spring Boot for managing backend services along with Netflix Zulu and Eureka for routing and service discovery, ensuring smooth communication between different services.

    • Databases: Their database setup includes EVCache for caching, Cassandra for scalable storage, and CockroachDB for global consistency.

    • Messaging/Streaming: Kafka and Flink handle real-time data processing and communication.

  • Streaming:

    • Video: Netflix uses Amazon S3 for video storage, their custom CDN called Open Connect for delivery, and AWS CloudFront for reliable streaming.

    • Transcoder: Elastic Transcoder converts videos into formats suitable for different devices.

  • Big Data:

    • Data Storage: Netflix uses Amazon Redshift, S3, Apache Iceberg, and Druid to handle the vast amounts of data it collects.

    • Data Processing: Apache Flink and Apache Spark handle real-time analytics, with results visualized using Tableau.

  • CI/CD:

    • DevOps Tools: Netflix uses JIRA for issue tracking, Confluence for collaboration, PagerDuty for incident response, Jenkins for automation, and Netflix Atlas for monitoring and alerting.

3 Must Know Tech Stacks

To give you a broader perspective, here are the three top popular tech stacks:

  1. The LAMP stack, consisting of Linux as the operating system, Apache as the web server, MySQL as the database, and PHP as the backend scripting language, is ideal for building dynamic websites with a reliable setup.

    It's cost-effective, flexible, and great for projects where stability is key. WordPress powers millions of websites using LAMP, leveraging its robust and scalable architecture. Wikipedia and Facebook (in its early days) also utilized this stack due to its simplicity and efficiency.

  1. The MEAN stack includes MongoDB as the NoSQL database, Express.js as the backend web application framework for Node.js, Angular as the frontend framework for building rich user interfaces, and Node.js as the JavaScript runtime for building scalable network applications.

    This stack is perfect for developing web applications that need fast development and scalability, streamlining the development process and making it easier to build scalable applications quickly. PayPal uses MEAN to handle millions of transactions efficiently, and companies like LinkedIn and Netflix have adopted the MEAN stack for its ability to streamline development processes and enhance scalability.

  1. The MERN stack comprises MongoDB as the NoSQL database, Express.js as the backend web application framework for Node.js, React as the frontend library for building user interfaces, particularly single-page applications where a fast response time is crucial, and Node.js as the JavaScript runtime for building scalable network applications.

    This stack is best for interactive and high-performance web applications, enhancing user experience and performance, making it ideal for single-page apps. Instagram uses MERN for a highly interactive user experience, while UberEats and Pinterest use the MERN stack to provide high performance and enhance user experience, which is crucial for their interactive and fast-paced applications.

PM’s role in deciding tech stacks

As a product manager, you are not responsible for making the final decision on the tech stack, but you can certainly influence it by:

  1. Define Project Requirements: Clearly outline the features needed so the tech stack supports them. Your detailed project specifications can guide the technical team in choosing technologies that meet these needs.

  2. Emphasize Time to Market: Highlight the importance of rapid development and deployment to meet your timelines. This can influence the choice of technologies ensuring the product reaches the market on time.

  3. Provide Security Requirements: Highlight the importance of protecting user information and complying with relevant regulations.

💡 Tech Term You Should Know (TTYSK)

Runtime Error

Runtime refers to the period when a program is running or executing, as opposed to the time when the program is being written or compiled.

Therefore, a runtime error refers to an error that occurs during the runtime phase, causing the app to crash or malfunction. For example, if an app crashes while in use, that's a runtime error. These errors prevent the application from functioning correctly and can occur unexpectedly.

Runtime errors are usually caught after the software has been released because they occur when the app is running and users interact with it in ways that developers might not have anticipated. These errors are typically tested for in the staging environment, but some might only become apparent after the product is in the hands of users.

Common Types of Runtime Errors

Let's explore some common runtime errors you might encounter and how they can affect your product:

  1. Logic Error:

    • When They Happen: During regular use of the application.

    • What They Are: Errors in the program's logic leading to incorrect outcomes.

    • Example: Imagine your app is live, and users are uploading files. During this process, the app crashes. The error log might look like:

      Logic Error Log

      This log shows a ZeroDivisionError which happened when the app was trying to handle a file upload. The error division by zero occurred because there was an attempt to divide a number by zero, which wasn’t caught during testing. This issue only appears when users interact with the file upload feature in real-time, causing the app to crash and need fixing.

  2. Validation Error:

    • When They Happen: During data input by users.

    • What They Are: Errors that occur when user input doesn't match the expected format or rules.

    • Example: Users try to submit a form without filling out all required fields, and the app crashes. The error log might show:

      Validation Error Log

      This log shows a ValidationError that occurred because a required field (email) was not filled out. This causes the app to crash instead of displaying a helpful error message to the user.

  3. Network Error:

    • When They Happen: During network requests.

    • What They Are: Errors that occur when the app fails to connect to the server or retrieve data.

    • Example: Users try to load new content, but due to a poor internet connection, the app fails to fetch data and crashes. The error log might show:

      Network Error Log

      This log shows a ConnectionError: Failed to fetch, meaning the app couldn't connect to the server due to network issues. This causes the app to crash or display an error message to the user.

  4. File I/O Error:

    • When They Happen: When reading or writing files.

    • What They Are: Errors that occur when the app fails to properly read from or write to a file.

    • Example: Users try to save their progress, but the app crashes because it can't write to the file due to a permissions issue. The error log might show:

      File I/O Error Log

      This log shows a FileNotFoundError: [Errno 2] No such file or directory, indicating that the app couldn't find the file path specified. This happens when the app tries to write to a file location that doesn't exist or is inaccessible due to permissions issues.

Proactive Measures for Product Managers

Understanding runtime errors is crucial for product managers because they directly impact user experience and product performance. Here’s how you can proactively address them:

  • Anticipate User Behavior: Collaborate with your team to anticipate how users might use the app beyond the “happy path.” Runtime errors often occur due to unexpected user interactions.

  • Rigorous Testing: Encourage thorough testing to make the app as fault-tolerant as possible. This involves working closely with developers and QA analysts to ensure robust testing scenarios.

  • Effective Communication: Maintain close contact with your development team to understand potential errors and the time needed to fix them. Keeping stakeholders informed about the impact on timelines and expected resolutions is essential.

  • Review User Feedback: Regularly review error logs and user reports to understand issues and prioritize fixes. User feedback is invaluable in identifying and addressing runtime errors that may not have been caught during testing.

Overall, staying on top of runtime errors allows for informed decision-making and a smoother user experience.

Missed the mid-month PM & Tech Jobs Newsletter?

Looking for a new job? Our PM & Tech Jobs newsletter is issued monthly with product role job listings from senior to entry-level roles.

As always, connect with me on LinkedIn and Twitter and follow Skiplevel on LinkedIn, Twitter, and Instagram.