Internet fundamentals

How data travels across the internet

Follow the same 2,400 bytes from packets to an application. Change the conditions where they matter.

0 msmodeled time
0 / 2,400 Bbytes received
0 / 2,400 Bapp-ready bytes
Your 2,400 bytesPrepare the data
Before transmission

One message, several pieces.

The same numbered pieces stay with us throughout the journey.

Inspect individual packet events

Optional close-up of this same transfer. Playback advances one event per beat, not in proportion to modeled time.

Ready to inspect this transfer.

Sender A

Four pieces of 600 bytes, plus headers

A1A2A3A4

Router queue

A = your data · dashed B = other traffic

Packets reach the router in the next step.

Receiver A → application

Arrived, waiting for earlier bytes

Nothing buffered

Available to the app

No data available yet

Lost attempts: none

One outgoing queue and link, zoomed out of a larger internet path. No real traffic is sent.
1 · Make packets

Smaller pieces. More headers.

Your application’s data travels in pieces. Each packet carries useful payload plus a header with delivery information.

2,400 bytes → four 600-byte payloads, each with an illustrative 40-byte header.

2,400 B payload + 160 B headers = 2,560 B before competing traffic and retries.

Try it · split the same data differently

Smaller packets take shorter turns, but repeat more headers.

Packets, segments, frames, and messages?

Applications define messages. TCP carries a byte stream in segments; IP carries packets; links carry frames. A TCP write need not equal a segment or a read. Applications must mark message boundaries. UDP preserves datagram boundaries.

A1/A2 label data groups, not TCP message numbers. Real maximum transmission units (MTUs) limit packet sizes. Both delivery models here use an illustrative 40-byte header, not exact real-world overhead.

2 · Wait your turn

A link carries more than your data.

We zoom into a router where the burst has arrived. Your A packets share one outgoing link with B traffic. Only one packet can transmit at a time.

Try it · add another conversation

Four A packets are queued. No competing traffic.

Sharing adds queueing—not extra physical travel time.

Where does this link fit in the internet?

Routers forward packets from one network to the next using next-hop information. This journey zooms into just one of those outgoing links.

A primary and alternate routeYour network can reach the destination through upstream routers, or an alternate provider after routes adapt.Your networkgateway routerUpstream AUpstream BAlternate providerDestinationserver network

The primary route is selected. This separate topology illustration does not change the transfer’s timings.

Paths often remain stable for a flow. Route changes take time and may lose packets. Routers select next hops, not necessarily the geographically shortest path. Packet switching shares capacity; circuit switching reserves resources.

4 · Receive the data

Arrived does not always mean available.

TCP delivers ordered bytes. If a piece is missing, later bytes can arrive at the receiver but wait before reaching the application.

Try it · change delivery on this same link

Arrival order so far

None yet

Released to the application so far

None yet

TCP adds recovery and ordering. Bare UDP leaves those decisions to the application.

What is simplified about recovery here?

A2 is lost once. The TCP-style retry joins the router queue 1,000 ms after A2’s first transmission ends. Real TCP uses acknowledgments, adaptive loss detection, flow control, and congestion control. Setup and ACK traffic are omitted here. Persistent failure can still end a TCP connection.

Delaying A1 is a controlled out-of-order case, not a claim that every packet takes a random route. The event inspector shows actual arrival and release times for the same run.

Does UDP mean unreliable apps—or always faster?

No. Applications can add recovery, ordering, security, and congestion control. QUIC runs over UDP and adds these capabilities with separate ordered streams. HTTP/3 uses QUIC; loss on one stream need not block another. Network delay still applies.

5 · Use the data

Complete, or in time?

This is the outcome of the same transfer—not another scenario. Replay it above to see the application receive data. A file needs every byte; audio also needs data before its playback deadline.

Same transfer · settings from stage 4
Delivery
TCP-style ordered stream
A2 loss
Off
A1 delay
Off
Change in 4. Receive →
Try it · what does the app need?

Every byte matters.

A complete file needs all 2,400 bytes. Missing data prevents completion.

Link settings: 600-byte payloads · 96 kbit/s · 60 ms one-way travel · no competing traffic.

The right delivery behavior depends on what the application needs.

What do these audio deadlines represent?

All numbered chunks are ready initially. Chunk 1 is due at 300 ms, then one every 150 ms. Deadlines are invented and anchored to this burst—not a full live call. Changing packet size changes the toy chunk boundaries and count, not a realistic audio encoding.

Data must be released to the app by its deadline, not merely arrive at the receiver. Real media also needs security, congestion handling, and jitter buffers. Missing audio may be concealed, recovered, or skipped.

Does delivery prove an app saved or read the data?

No. A TCP acknowledgment confirms transport receipt—not processing, saving, or human reading. Chat needs complete messages plus application-level receipts. Applications must also arrange datagrams into the right order when using bare UDP.

Step 1 of 5 · Make packets.