AP Computer Science Principles · Computer systems and networks
Fault tolerance
1Redundancy and fault tolerance
A system is fault tolerant if it continues to work even when some of its parts fail.
The internet achieves fault tolerance through redundancy: including extra components (devices and connections) so that there is more than one path between devices. If one router or cable fails, packets are routed along another path.
Redundancy has costs: extra equipment, maintenance and energy. Designers balance reliability against cost.
Check yourself
What does redundancy mean in a network?
Show the answer
Extra connections and devices that provide alternative paths
Backup paths.
2Analysing network diagrams
Exam questions often show devices (circles) connected by lines. To judge fault tolerance:
- Count the distinct paths between two devices.
- Find devices or connections whose failure would disconnect part of the network (single points of failure).
- Check whether two devices can still communicate after a given failure.
devices A, B, C, D, E with connections A–B, A–C, B–D, C–D, D–E.
- A to D: two paths (A–B–D and A–C–D). If B fails, A–C–D still works.
- D to E: only one connection. If D–E fails, E is cut off: a single point of failure.
- Adding a connection C–E would make E reachable by two routes.
A has two routes to D, but E hangs on one link: a single point of failure
Check yourself
In the example, which single connection failure disconnects a device?
Show the answer
D–E
E has only one link.
3Fault tolerance beyond the network
The same idea is used elsewhere:
- Data backups and copies stored in several data centres.
- RAID storage keeps copies of data across several disks.
- Spare power supplies and generators.
- Cloud services run copies of a program on several servers so users are not affected if one fails.
Check yourself
Storing copies of photos on servers in three different countries is an example of:
Show the answer
Redundancy for fault tolerance
Copies survive failures.
4Why fault tolerance matters
The internet was designed to keep working when parts are damaged or overloaded. Fault tolerance:
- keeps critical services (emergency calls, hospitals, banking) available;
- lets the network route around congestion and outages;
- supports scalability: adding paths increases both capacity and resilience.
Check yourself
Why is the internet considered fault tolerant?
Show the answer
Packets can be rerouted when devices or connections fail
Rerouting.
5Going deeper: redundancy, and reading network diagrams
A system is fault-tolerant if it continues to work when some of its parts fail.
The Internet achieves this through redundancy: including extra components (connections, routers, servers) beyond the minimum needed, so that others can take over when one fails.
Redundant routing: when there is more than one path between two devices, the failure of a connection or device on one path does not cut them off. Packets are simply sent another way. Because routing is dynamic, this happens automatically.
Costs and benefits of redundancy
- Benefit: reliability; the network keeps running through failures; it can also carry more traffic and scale to more users.
- Cost: more hardware and connections to buy, power and maintain.
Designers decide how much reliability is worth paying for.
Single point of failure: a component whose failure stops the whole system. Fault-tolerant design tries to eliminate them.
Reading network diagrams: devices are drawn as labelled points and connections as lines. Typical questions:
1. Can two devices still communicate if a given connection fails? Look for any other path.
2. What is the minimum number of connections that must fail to cut two devices off? Find the smallest set of lines whose removal leaves no path.
a network has devices A, B, C, D and E with connections A–B, A–C, B–C, B–D, C–E and D–E.
- Paths from A to D include A–B–D and A–C–E–D (and A–C–B–D).
- If connection B–D fails: A–C–E–D still works. A and D can communicate.
- What is the fewest connections that must fail to isolate A? A has two lines (A–B and A–C); both must fail: 2.
- What is the fewest to cut A off from D? D also has only two lines (B–D and D–E). Removing both isolates D: 2. No single failure can do it, since after any one line is removed a path remains.
Worked example (a weak network): devices P, Q, R and S connected in a line: P–Q, Q–R, R–S.
- Only one path links P and S.
- Any one failure cuts them off.
- Every connection is a single point of failure. Adding a line S–P would make a ring, which survives any single failure.
Method for "minimum failures" questions
- Count the connections at each of the two devices; the smaller count is an upper limit (cutting all of a device's lines isolates it).
- Look for a bottleneck: a single line or device that every path must use. If one exists, the answer is 1.
- Otherwise check whether two separate (non-overlapping) paths exist; if so, at least 2 failures are needed.
Redundancy beyond routing
- Data: backups, and copies stored in several data centers, so that a hardware failure loses nothing.
- Servers: several machines sharing the load; if one fails the others carry on.
- Power: batteries and generators.
- Error-checking: extra bits sent with data so that corruption can be detected, and packets re-sent (TCP).
- Aircraft and spacecraft carry duplicate control computers.
Fault tolerance and scale: the Internet was designed from the start to survive failures. No central controller exists; each router decides where to forward packets. That design also lets the network grow easily, since new routes and devices can be added anywhere.
What fault tolerance does not do: it does not prevent failures, and it has limits. If all the paths between two points fail, communication stops. A widely shared service (a major DNS provider, a cloud platform) can still be a point of failure for the many sites that depend on it.
Case study: in several incidents, an outage at a single large cloud or content-delivery company has made thousands of unrelated websites unreachable for hours. The Internet's routing kept working; the sites had concentrated their dependence in one place.
Common mistakes
- Defining fault tolerance as "having no faults."
- Saying redundancy is free.
- Counting paths without checking whether they share a connection.
- Confusing redundancy (extra capacity for reliability) with data compression's removal of redundancy.
Check yourself
Why does the Internet continue to function when an individual router fails?
Show the answer
Redundant paths allow packets to be routed around the failure
Multiple routes exist between most points, and routing is dynamic.
6For top marks
- When analysing a diagram, name the specific path(s) and the specific failure(s).
- Use "single point of failure" for a device or link whose loss disconnects others.
- Explain the trade-off: more redundancy costs more but increases reliability.
- Distinguish fault tolerance (keeps working despite failures) from error correction (TCP resending lost packets), though both improve reliability.
"Removing router R would leave the school network connected only through the single link to the library, so R is a single point of failure."
Check yourself
What is the main cost of adding redundancy?
Show the answer
Extra equipment and maintenance
Trade-off.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera