No history yet

Introduction to Distributed Systems

What Is a Distributed System?

A distributed system is a group of separate computers that work together so closely they appear as a single machine to the end user. Think of a large website like Google or Amazon. When you use their services, you're not interacting with just one computer. You're interacting with thousands of them, all coordinated to handle your request.

Imagine a team of chefs in a busy kitchen. One chef chops vegetables, another grills meat, and a third plates the final dish. Each chef is an independent worker, but they communicate and coordinate to produce a single, complete meal. A distributed system works on the same principle. Each computer, or 'node', handles a piece of the puzzle, and they collaborate over a network to achieve a common goal.

The core characteristics are multiple computers, network communication, and a shared goal, all hidden behind a unified interface.

Lesson image

The Hard Parts

Building these systems is challenging because the real world is messy. Two major hurdles are network latency and the risk of partial failures.

Network Latency is the time it takes for a message to travel from one computer to another. It’s the digital equivalent of mail delay. Sending a message across a city is faster than sending it across an ocean. This delay, even if it's just milliseconds, can create significant bottlenecks and complicates coordination between nodes.

Partial Failure is a unique problem for distributed systems. In a single computer, if a component fails, the whole system usually crashes. But in a distributed system, one computer can fail while the others keep running. This is like one chef in our kitchen suddenly leaving. The rest of the kitchen is still operational, but how do they adapt? Do they wait? Do other chefs take over the missing tasks? The system must be designed to gracefully handle these partial outages without bringing everything to a halt.

How They Talk

To work together, the computers in a distributed system need a clear way to communicate. There are several models for this, but two of the most common are client-server and peer-to-peer.

Client

noun

A computer or application that requests a service or resource from a server.

The client-server model is the most familiar. One computer, the server, holds the data or provides a service. Other computers, the clients, request it. When you visit a website, your web browser acts as a client, requesting the webpage from the website's server. This is a simple, centralized approach where the roles are clearly defined.

Lesson image

The peer-to-peer (P2P) model is different. There are no specialized servers. Every computer in the network is an equal, or a 'peer'. Each peer can act as both a client and a server, sharing files or resources directly with others. Early file-sharing services like Napster and modern technologies like BitTorrent are classic examples. This model is decentralized, making it resilient to single points of failure.

Understanding these fundamental models and challenges is the first step toward building systems that can communicate effectively across a network. It provides the context for more specific protocols that manage these complex interactions.