Video coming soon. Start with the reading below.
“The network is reliable.”
– Fallacies of distributed computing, L. Peter Deutsch
Communication between processes over the network, or interprocess communication (IPC), is at the heart of distributed systems — it’s what makes distributed systems distributed. In order for processes to communicate, they need to agree on a set of rules that determine how data is processed and formatted. Network protocols specify such rules.
The protocols are arranged in a stack[6], where each layer builds on the abstraction provided by the layer below, and lower layers are closer to the hardware. When a process sends data to another through the network stack, the data moves from the top layer to the bottom one and vice-versa at the other end, as shown in Figure 1.3:
- The link layer consists of network protocols that operate on local network links, like Ethernet or Wi-Fi, and provides an interface to the underlying network hardware. Switches operate at this layer and forward Ethernet packets based on their destination MAC address[7].
- The internet layer routes packets from one machine to another across the network. The Internet Protocol (IP) is the core protocol of this layer, which delivers packets on a best-effort ba-

Figure 1.3: Internet protocol suite
sis (i.e., packets can be dropped, duplicated, or corrupted). Routers operate at this layer and forward IP packets to the next router along the path to their final destination. • The transport layer transmits data between two processes. To enable multiple processes hosted on the same machine to communicate at the same time, port numbers are used to ad-dress the processes on either end. The most important protocol in this layer is the Transmission Control Protocol (TCP), which creates a reliable communication channel on top of IP. • Finally, the application layer defines high-level communication protocols, like HTTP or DNS. Typically your applications will target this level of abstraction.
Even though each protocol builds on top of another, sometimes the abstractions leak. If you don’t have a good grasp of how the lower layers work, you will have a hard time troubleshooting network-ing issues that will inevitably arise. More importantly, having an appreciation of the complexity of what happens when you make a network call will make you a better systems builder.
Reliable links (lesson 02.02) describes how to build a reliable communication channel (TCP) on top of an unreliable one (IP), which can drop or duplicate data or deliver it out of order. Building reliable abstractions on top of unreliable ones is a common pattern we will encounter again in the rest of this learning path.
Secure links (lesson 02.03) describes how to build a secure channel (TLS) on top of a reliable one (TCP). Security is a core concern of any system, and in this lesson, we will get a taste of what it takes to secure a network connection from prying eyes and malicious agents.
Discovery (lesson 02.04) dives into how the phone book of the internet (DNS) works, which allows nodes to discover others using names. At its heart, DNS is a distributed, hierarchical, and eventually consistent key-value store. By studying it, we will get the first taste of eventual consistency[8] and the challenges it introduces.
APIs (lesson 02.05) concludes this part by discussing how loosely coupled services communicate with each other through APIs by describing the implementation of a RESTful HTTP API built upon the protocols introduced earlier.
References
- “Internet protocol suite,” https://en.wikipedia.org/wiki/Internet_protocol_suite
- “MAC address,” https://en.wikipedia.org/wiki/MAC_address
- We will learn more about consistency models in Replication (lesson 03.06).