AP® Computer Science Principles · Big Idea 4 · Topic 4.3

Distributed Computing at Scale

Distributed computing splits one big job into pieces that run on many ordinary machines at once, so a task too big or too slow for one computer finishes by sharing both the work and the storage.

Some problems are too big for one machine, no matter how fast. A single computer has limited storage, limited memory, and a limited processor. Instead of building one impossibly expensive supercomputer, you can take a thousand ordinary machines you already know how to build and split the job across them. This is often the cheaper, more practical choice long before a single big machine becomes physically or financially impossible.

Distributed computing splits both the data and the work. A huge file gets broken into chunks, and those chunks are stored across many machines rather than one. Each machine then runs the same kind of computation on its own chunk, independently and at the same time. Take counting word frequencies across a petabyte of text: the text is divided into pieces, each machine counts the words in its own piece, and then the partial counts get combined into one final total. No machine ever has to hold or process the whole dataset alone.

Scale introduces a new problem: with a thousand machines running, some will fail mid-job. A well-designed distributed system expects this. It keeps copies of data on more than one machine and can reassign a dead machine's piece of work to another one, so the whole job does not restart from scratch. This is also why distributed computing connects directly to massive data sets: once a dataset is too large for any single computer's storage, spreading it across a cluster is not just about speed, it is the only way to hold and process the data at all.

Key terms

Distributed computing
Splitting one computational job across many separate machines that work on it at the same time.
Cluster
A group of many connected ordinary machines that work together as if they were one system.
Fault tolerance
A system's ability to keep working correctly even when one or more of its machines fail.
Partial result
The output one machine produces from its own piece of the data, before all pieces are combined.

Watch it explained

  1. How it worksHow does distributed computing split both the work and the storage across many computers?
  2. How it worksWalk me through counting word frequencies in a petabyte of text across a cluster.
  3. Going furtherWhat changes about a distributed job when one machine dies partway through it?
  4. Ties togetherHow does distributed computing connect to data sets too large for a single computer?

Check yourself

Your turn1 of 2
A distributed job splits 699 terabytes of data evenly across 67 machines. How many terabytes does each machine handle?

End of topic.