---
title: "Big Idea 4: Packets, Routing & Streaming | FiveStudy"
description: "Comprehensive study guide for AP Computer Science Principles. Free on FiveStudy."
url: https://fivestudy.com/guides/packets-routing-streaming
---

[AP Computer Science Principles](https://fivestudy.com/ap-computer-science-principles) · Study guide

# Big Idea 4: Packets, Routing & Streaming

[Figure: FiveStudy logo]

FiveStudy

Big Idea 4 · Part 2

Big Idea 4 · Computer Systems & Networks · Part 2 of 3

# Packets, Routing & *Streaming*

How data gets broken into packets, why they can take different paths, and a complete walkthrough of what happens when you stream a movie on Netflix.

## §1 Packets and Routing

When you send data across the Internet, it is broken into small chunks called **packets**. Each packet contains:

- A piece of the actual data (the **payload**)
- **Metadata** in the header: source, destination, sequence number, etc.

Three packet facts

1. Packets from the same message may take **different paths** to the destination.
2. Packets may arrive **out of order**.
3. The receiver uses the **metadata** in each packet's header to reassemble them correctly.

Key idea

Packet switching + dynamic routing = fault tolerance. If one route fails, packets flow around it. This is the core reason the Internet survives hardware failures.

## §2 Putting It All Together: Streaming Netflix

Every concept in Big Idea 4 shows up when you stream a movie. Here's the full pipeline.

### 2.1 Finding Netflix's Servers (DNS)

You type netflix.com or open the app. Your device asks a **DNS server**: "what IP address goes with netflix.com?" DNS returns an IP — usually of a server physically close to you, since Netflix runs many servers worldwide to reduce **latency**.

### 2.2 Connecting to the Server (Protocols)

Your device sends an HTTPS request to that IP. The request is:

- Broken into **packets** by TCP, each with metadata (source, destination, sequence number).
- Sent through a series of **routers**. Packets may take different paths.
- **Encrypted** using HTTPS (public-key establishes trust; symmetric keys handle bulk traffic).

### 2.3 Logging In and Browsing

Each click sends small encrypted request/response exchanges. Low **latency** matters more than high bandwidth here — clicks should feel instant.

### 2.4 Streaming the Movie

- The movie is stored using **lossy video compression** (a BI2 concept). Lossless video would be hundreds of MB/s — far too much to stream. Lossy shrinks it ~100× while keeping the viewing experience acceptable.
- Netflix sends chunks of video in packets continuously. Your device **buffers** a few seconds ahead.
- Higher **bandwidth** = higher quality (SD → HD → 4K). Netflix adjusts dynamically.
- **Latency** is less critical during streaming than during initial connection.

### 2.5 When Things Go Wrong (Fault Tolerance)

If a router fails mid-movie:

- Packets automatically route around the failure using **redundant paths**.
- You might see a brief buffering icon.
- Within seconds, packets flow via a different path. The movie resumes.
- TCP handles retransmission of lost packets. DNS doesn't need re-querying.

Why this matters

A single Netflix session uses nearly every BI4 concept: DNS for lookup, TCP/IP for packets, HTTPS for encryption, redundant routing for fault tolerance, bandwidth for quality, latency for responsiveness. Understanding this scenario is a good test of whether you understand the Big Idea.

## §3 Exam Patterns

### 3.1 "Which network is most fault-tolerant?"

Count independent paths between nodes. More paths = more tolerant. Mesh > ring > star > linear.

### 3.2 "Which disconnection breaks communication?"

Trace every path between source and destination. A set of disconnections breaks communication only if *every* path passes through at least one of them.

## §4 Key Terms

| Term | Definition |
| --- | --- |
| **Packet** | A small chunk of data with header metadata |
| **Path** | The route data travels from sender to receiver |
| **Router** | Device that forwards packets between networks |
| **TCP** | Guarantees reliable, in-order delivery of packets |

## §5 Self-Check

1. Why are packets sometimes delivered out of order, and how does the receiver fix this?
2. What protocol is responsible for detecting a lost packet and requesting retransmission?
3. Why does Netflix use lossy compression instead of lossless for streaming video?

**Show Answers**

1. Packets may take different paths through the network and arrive at different times. The receiver uses sequence numbers in each packet's header to reassemble them correctly.
2. **TCP.** It guarantees reliable, in-order delivery and handles retransmission. IP only handles addressing and routing.
3. Lossless video would be hundreds of MB/s — no home connection can stream that. Lossy compression shrinks it ~100× by discarding details the human eye barely notices, making streaming feasible while keeping perceived quality high.

FiveStudy · AP Computer Science Principles · 2025–26

BI4 Part 2 · Packets, Routing & Streaming
