Skip to the content.

Fault Tolerance

What is Fault Tolerance?

Fault Tolerance = The ability of a system to keep working even when some parts fail.

In other words: πŸ‘‰ Your system does NOT go down just because 1 server, 1 database, or 1 component crashes.


Why is Fault Tolerance important?

Because hardware fails, networks fail, software crashes, power cuts happen β€” but your users expect the app/website to work anyway.

Examples:


How do we improve Fault Tolerance?

Let’s break it per component clearly:

Component Problem if it fails? Solution to tolerate the failure?
Web server Users can’t access website Deploy multiple web servers behind a Load Balancer. If 1 dies, LB sends traffic to the others automatically.
Database App can’t read/write data Use Primary-Replica setup (Master-Slave). If primary DB fails, failover to replica DB (some DBs like PostgreSQL, MongoDB have auto-failover features).
Application server (backend logic) Business logic is unavailable Design app servers to be stateless β†’ You can start new app servers easily and balance traffic.
Region / Data center Entire location goes down (earthquake, power cut) Deploy in multiple regions or availability zones. E.g., AWS offers Multi-AZ deployment β†’ if 1 zone fails, traffic shifts to another.
Cache server (like Redis) Cache unavailable Use replicated caches or configure cache warm-up to restore quickly.

Core Tools / Concepts that improve Fault Tolerance


A simple example

You have:

Scenario:

= Fault tolerant system.


Golden sentence (for interviews)

β€œFault tolerance is about ensuring redundancy and automatic recovery, so the system remains operational despite component failures.”