The Wayback Machine - https://web.archive.org/web/20241118041935/https://www.geeksforgeeks.org/fault-tolerance-in-distributed-system/
Open In App

Fault Tolerance in Distributed System

Last Updated : 01 Aug, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Fault tolerance in distributed systems is the capability to continue operating smoothly despite failures or errors in one or more of its components. This resilience is crucial for maintaining system reliability, availability, and consistency. By implementing strategies like redundancy, replication, and error detection, distributed systems can handle various types of failures, ensuring uninterrupted service and data integrity.

Fault-Tolerance-in-Distributed-System

Fault Tolerance in Distributed System

In distributed systems, three types of problems occur. All these three types of problems are related.

  • Fault: Fault is defined as a weakness or shortcoming in the system or any hardware and software component. The presence of fault can lead to error and failure.
  • Errors: Errors are incorrect results due to the presence of faults.
  • Failure: Failure is the outcome where the assigned goal is not achieved.

What is Fault Tolerance?

Fault Tolerance is defined as the ability of the system to function properly even in the presence of any failure. Distributed systems consist of multiple components due to which there is a high risk of faults occurring. Due to the presence of faults, the overall performance may degrade.

Types of Faults

  • Transient Faults: Transient Faults are the type of faults that occur once and then disappear. These types of faults do not harm the system to a great extent but are very difficult to find or locate. Processor fault is an example of transient fault.
  • Intermittent Faults: Intermittent Faults are the type of faults that come again and again. Such as once the fault occurs it vanishes upon itself and then reappears again. An example of intermittent fault is when the working computer hangs up.
  • Permanent Faults: Permanent Faults are the type of faults that remain in the system until the component is replaced by another. These types of faults can cause very severe damage to the system but are easy to identify. A burnt-out chip is an example of a permanent Fault.  

Need for Fault Tolerance in Distributed Systems

Fault Tolerance is required in order to provide below four features.

  1. Availability: Availability is defined as the property where the system is readily available for its use at any time.
  2. Reliability: Reliability is defined as the property where the system can work continuously without any failure.
  3. Safety: Safety is defined as the property where the system can remain safe from unauthorized access even if any failure occurs.
  4. Maintainability: Maintainability is defined as the property states that how easily and fastly the failed node or system can be repaired.

Fault Tolerance in Distributed Systems

In order to implement the techniques for fault tolerance in distributed systems, the design, configuration and relevant applications need to be considered. Below are the phases carried out for fault tolerance in any distributed systems.

Phases-of-Fault-Tolerance-in-Distributed-Systems

Phases of Fault Tolerance in Distributed Systems

1. Fault Detection

Fault Detection is the first phase where the system is monitored continuously. The outcomes are being compared with the expected output. During monitoring if any faults are identified they are being notified. These faults can occur due to various reasons such as hardware failure, network failure, and software issues. The main aim of the first phase is to detect these faults as soon as they occur so that the work being assigned will not be delayed.

2. Fault Diagnosis

Fault diagnosis is the process where the fault that is identified in the first phase will be diagnosed properly in order to get the root cause and possible nature of the faults. Fault diagnosis can be done manually by the administrator or by using automated Techniques in order to solve the fault and perform the given task.

3. Evidence Generation

Evidence generation is defined as the process where the report of the fault is prepared based on the diagnosis done in an earlier phase. This report involves the details of the causes of the fault, the nature of faults, the solutions that can be used for fixing, and other alternatives and preventions that need to be considered.

4. Assessment

Assessment is the process where the damages caused by the faults are analyzed. It can be determined with the help of messages that are being passed from the component that has encountered the fault. Based on the assessment further decisions are made.

5. Recovery

Recovery is the process where the aim is to make the system fault free. It is the step to make the system fault free and restore it to state forward recovery and backup recovery. Some of the common recovery techniques such as reconfiguration and resynchronization can be used.

Types of Fault Tolerance in Distributed Systems

  1. Hardware Fault Tolerance: Hardware Fault Tolerance involves keeping a backup plan for hardware devices such as memory, hard disk, CPU, and other hardware peripheral devices. Hardware Fault Tolerance is a type of fault tolerance that does not examine faults and runtime errors but can only provide hardware backup. The two different approaches that are used in Hardware Fault Tolerance are fault-masking and dynamic recovery.
  2. Software Fault Tolerance: Software Fault Tolerance is a type of fault tolerance where dedicated software is used in order to detect invalid output, runtime, and programming errors. Software Fault Tolerance makes use of static and dynamic methods for detecting and providing the solution. Software Fault Tolerance also consists of additional data points such as recovery rollback and checkpoints.
  3. System Fault Tolerance: System Fault Tolerance is a type of fault tolerance that consists of a whole system. It has the advantage that it not only stores the checkpoints but also the memory block, and program checkpoints and detects the errors in applications automatically. If the system encounters any type of fault or error it does provide the required mechanism for the solution. Thus system fault tolerance is reliable and efficient.

Fault Tolerance Strategies

Fault tolerance strategies are essential for ensuring that distributed systems continue to operate smoothly even when components fail. Here are the key strategies commonly used:

  • Redundancy and Replication
    • Data Replication: Data is duplicated across multiple nodes or locations to ensure availability and durability. If one node fails, the system can still access the data from another node.
    • Component Redundancy: Critical system components are duplicated so that if one component fails, others can take over. This includes redundant servers, network paths, or services.
  • Failover Mechanisms
    • Active-Passive Failover: One component (active) handles the workload while another component (passive) remains on standby. If the active component fails, the passive component takes over.
    • Active-Active Failover: Multiple components actively handle workloads and share the load. If one component fails, others continue to handle the workload.
  • Error Detection Techniques
    • Heartbeat Mechanisms: Regular signals (heartbeats) are sent between components to detect failures. If a component stops sending heartbeats, it is considered failed.
    • Checkpointing: Periodic saving of the system’s state so that if a failure occurs, the system can be restored to the last saved state.
  • Error Recovery Methods
    • Rollback Recovery: The system reverts to a previous state after detecting an error, using saved checkpoints or logs.
    • Forward Recovery: The system attempts to correct or compensate for the failure to continue operating. This may involve reprocessing or reconstructing data.

Design Patterns for Fault Tolerance

Design patterns for fault tolerance help in creating systems that can handle failures gracefully and maintain reliable operations. Here are some key fault tolerance design patterns:

1. Circuit Breaker Pattern

This pattern prevents a system from making calls to a failing service by wrapping it in a “circuit breaker.” When the service fails, the circuit breaker trips, causing further calls to fail fast instead of trying to connect to a failing service repeatedly.

Useful in scenarios where services might experience temporary outages. For example, a microservices architecture where a downstream service might be unreliable.

2. Bulkhead Pattern

This pattern isolates different components or services to prevent a failure in one part of the system from affecting others. It’s similar to the bulkheads in a ship that prevent flooding in one compartment from sinking the entire vessel.

Essential in systems where failures in one service should not impact others. For instance, an e-commerce platform might use bulkhead isolation to separate payment processing from inventory management.

3. Retry Pattern

This pattern involves automatically retrying an operation that has failed due to transient errors. The retries are typically done with exponential backoff to avoid overwhelming the system.

Suitable for scenarios where operations might fail intermittently due to temporary issues like network glitches or service overloads.

4. Rate Limiting Pattern

This pattern controls the number of requests a system or service can handle within a specific time window to prevent overload and ensure fair usage.

Essential for APIs and services that might be susceptible to abuse or excessive traffic. It helps in maintaining system stability and performance.

5. Failover Pattern

This pattern involves switching to a backup system or component when the primary one fails. It ensures continuity of service by having redundant systems ready to take over.

Ideal for systems requiring high availability, such as critical financial systems or cloud services.

Conclusion

Fault Tolerance in Distributed Systems is a major task that needs to be accomplished. Faults can lead to a reduction in the overall performance of the system. The faults that arise also differ from one another. Therefore these faults need to be identified and handled according to the working, architecture, and applications of the given distributed systems.

FAQs for Fault Tolerance in Distributed System

1. What is the basic principle of Fault Tolerance?

The basic principle of fault tolerance is to provide a system to continue its working even if any of the parts of it fails and does not affect the performance of the system.

2. What is meant by fault tolerance testing?

Fault Tolerance testing is defined as the process of testing the overall system in order to check for any failure that can occur during performing the intended operation.

3. What is the difference between Fault Tolerance and Load balancing?

Fault Tolerance is a way for working the system even under any failure and makes the system more reliable and robust. Load balancing distributes the load among available processing elements. It ensures better scalability and response time for the users.

4. What is meant by fault in Distributed Systems?

A fault is defined as a weakness or any shortcoming in the system that affects the overall performance and output of the system.



Similar Reads

Distributed System Fault Tolerance Using Message Logging and Checkpointing
In distributed computing, ensuring system reliability and resilience in the face of failures is very important. Fault tolerance mechanisms like message logging and checkpointing play a crucial role in maintaining the consistency and availability of distributed systems. This article makes you understand the intricacies of combining message logging a
11 min read
Byzantine Fault Tolerance in Distributed System
Byzantine Fault Tolerance in Distributed Systems ensures resilience against malicious actors or failures. It guarantees correct operation despite faulty components or intentional attacks. Properties include redundancy and decentralized decision-making. Byzantine Fault Tolerance is the shield that guards against chaos in our interconnected digital w
7 min read
Minimum number of nodes to achieve Byzantine Fault Tolerance
Byzantine Fault Tolerance (BFT) ensures a system can handle arbitrary node failures. It maintains reliable operations despite some nodes acting maliciously or failing. BFT is crucial for systems requiring high security and reliability. Achieving BFT requires a minimum number of nodes. This guarantees that non-faulty nodes outnumber faulty ones. In
4 min read
Distributed System - Thrashing in Distributed Shared Memory
In this article, we are going to understand Thrashing in a distributed system. But before that let us understand what a distributed system is and why thrashing occurs. In naive terms, a distributed system is a network of computers or devices which are at different places and linked together. Each one of these distributed computers shares the same s
4 min read
Distributed System - Types of Distributed Deadlock
A Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource occupied by some other process. When this situation arises, it is known as Deadlock. A Distributed System is a Network of Machines that can exchange information with each other through Message-passing. It can be
4 min read
Distributed Information Systems in Distributed System
Distributed systems consist of multiple independent computers working together as a unified system. These systems offer enhanced scalability, reliability, and fault tolerance. They ensure efficient resource utilization and performance by distributing tasks across various nodes. One crucial aspect is managing and sharing data effectively, which is t
9 min read
Distributed Ledger Technology(DLT) in Distributed System
Distributed Ledger Technology (DLT) is a way to record and share data across multiple computers, ensuring that all copies of the data are synchronized and secure. Unlike traditional databases controlled by a single entity, DLT allows for decentralized data storage and management. This makes it harder for data to be tampered with and increases trans
11 min read
Distributed Snapshots in Distributed System
Distributed snapshots are crucial for capturing the state of distributed systems at a specific point in time. They enable consistency and recovery, helping to maintain the integrity of the system amidst failures or concurrent operations. This article explores the concepts, techniques, properties, and challenges of distributed snapshots. Table of Co
6 min read
Distributed System vs. Distributed Computing
Distributed systems and distributed computing are foundational to modern technology, enabling complex tasks to be handled across multiple machines. While the two terms are often used interchangeably, they have distinct focuses. Distributed systems emphasize the coordination of independent components to work as a unified whole, ensuring reliability,
6 min read
Operating System - Difference Between Distributed System and Parallel System
A distributed system is a model where distributed applications are running on multiple computers linked by a communications network. Sometimes it is also called loosely coupled systems because in which each processor has its own local memory and processing units. LOCUS and MICROS are some examples of distributed operating systems. Parallel Systems
4 min read
Difference between a Distributed Lock Manager and a Distributed Database
In today’s world, managing data and resources efficiently across multiple locations is crucial. Distributed Lock Managers and Distributed Databases are foundational in achieving this. They serve different yet complementary roles in distributed systems. While a distributed lock manager coordinates access to shared resources, a distributed database h
5 min read
Distributed Consensus in Distributed Systems
In distributed systems, achieving consensus among nodes is critical for maintaining coherence and reliability. This article explores the principles, algorithms, challenges, and applications of distributed consensus, which are essential for ensuring agreement across decentralized networks. Important Topics for Distributed Consensus in Distributed Sy
11 min read
Distributed Task Queue - Distributed Systems
A Distributed Task Queue is a system used in distributed computing to manage and coordinate tasks across multiple machines or servers. Instead of one machine handling all tasks, a distributed task queue spreads out the work, making the process faster and more efficient. Each task is placed in a queue, and available workers pick up and complete task
11 min read
Distributed Garbage Collection in Distributed Systems
Distributed garbage collection is a technique used in distributed systems to manage memory efficiently across multiple computers. In a distributed system, different machines work together to perform tasks, and each machine has its own memory. As these machines create and use data, some of it becomes obsolete and needs to be removed to free up space
10 min read
Distributed File Systems vs Distributed Object Storage
As organizations scale their operations, the need for efficient and reliable data storage systems increases. Two prominent architectures that fulfill this need are Distributed File Systems (DFS) and Distributed Object Storage (DOS). While both systems provide scalable and redundant storage across multiple nodes, they differ significantly in their s
4 min read
Distributed System vs. Clustered System
When discussing scalability and reliability as well as performance in the context of computing, terms such as distributed systems and clustered systems are unavoidably mentioned. Even though they have a few common characteristics, they are two different ideas with different architectures and usage. It is important to understand the distinctions bet
5 min read
What is Scalable System in Distributed System?
In distributed systems, a scalable system refers to the ability of a networked architecture to handle increasing amounts of work or expand to accommodate growth without compromising performance or reliability. Scalability ensures that as demand grows—whether in terms of user load, data volume, or transaction rate—the system can efficiently adapt by
10 min read
Google File System(GFS) vs. Hadoop Distributed File System (HDFS)
In distributed file systems, Google File System (GFS) and Hadoop Distributed File System (HDFS) stand out as crucial technologies. Both are designed to handle large-scale data, but they cater to different needs and environments. In this article, we will understand the differences between them. Table of Content What is Google File System (GFS)? Key
6 min read
Maekawa’s Algorithm for Mutual Exclusion in Distributed System
Prerequisite - Mutual exclusion in distributed systems Maekawa's Algorithm is quorum based approach to ensure mutual exclusion in distributed systems. As we know, In permission based algorithms like Lamport's Algorithm, Ricart-Agrawala Algorithm etc. a site request permission from every other site but in quorum based approach, A site does not reque
4 min read
Ricart–Agrawala Algorithm in Mutual Exclusion in Distributed System
Prerequisite: Mutual exclusion in distributed systems Ricart–Agrawala algorithm is an algorithm for mutual exclusion in a distributed system proposed by Glenn Ricart and Ashok Agrawala. This algorithm is an extension and optimization of Lamport's Distributed Mutual Exclusion Algorithm. Like Lamport's Algorithm, it also follows permission-based appr
3 min read
Lamport's Algorithm for Mutual Exclusion in Distributed System
Prerequisite: Mutual exclusion in distributed systems Lamport's Distributed Mutual Exclusion Algorithm is a permission based algorithm proposed by Lamport as an illustration of his synchronization scheme for distributed systems. In permission based timestamp is used to order critical section requests and to resolve any conflict between requests. In
5 min read
Suzuki–Kasami Algorithm for Mutual Exclusion in Distributed System
Prerequisite: Mutual exclusion in distributed systems Suzuki–Kasami algorithm is a token-based algorithm for achieving mutual exclusion in distributed systems.This is modification of Ricart–Agrawala algorithm, a permission based (Non-token based) algorithm which uses REQUEST and REPLY messages to ensure mutual exclusion. In token-based algorithms,
3 min read
Difference between Token based and Non-Token based Algorithms in Distributed System
A distributed system is a system in which components are situated in distinct places, these distinct places refer to networked computers which can easily communicate and coordinate their tasks by just exchanging asynchronous messages with each other. These components can communicate with each other to conquer one common goal as a task. There are ma
3 min read
Various Failures in Distributed System
DSM implements distributed systems shared memory model in an exceedingly distributed system, that hasn’t any physically shared memory. The shared model provides a virtual address space shared between any numbers of nodes. The DSM system hides the remote communication mechanism from the appliance author, protecting the programming ease and quality t
3 min read
Load-Sharing Approach in Distributed System
Load sharing basically denotes the process of forwarding a router to share the forwarding of traffic, in case of multiple paths if available in the routing table. In case there are equal paths then the forwarding process will follow the load-sharing algorithm. In load sharing systems, all nodes share the overall workload, and the failure of some no
6 min read
Types of Distributed System
Pre-requisites: Distributed System A Distributed System is a Network of Machines that can exchange information with each other through Message-passing. It can be very useful as it helps in resource sharing. It enables computers to coordinate their activities and to share the resources of the system so that users perceive the system as a single, int
8 min read
Difference Between Load Balancing and Load Sharing in Distributed System
A distributed system is a computing environment in which different components are dispersed among several computers (or other computing devices) connected to a network. These devices broke up the work and coordinated their efforts to do the job faster than if it had been assigned to a single device. Load Balancing:Load balancing is the practice of
2 min read
Deadlock Prevention Policies in Distributed System
A Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for a resource that is held by some other process. There are four necessary conditions for a Deadlock to happen which are: Mutual Exclusion: There is at least one resource that is non-sharable and can be used by only one Process at
4 min read
Event Ordering in Distributed System
In this article, we will look at how we can analyze the ordering of events in a distributed system. As we know a distributed system is a collection of processes that are separated in space and which can communicate with each other only by exchanging messages this could be processed on separate computers or it could even be multiple processes within
4 min read
Process Addressing in Distributed System
In this article, we will go through the concept of addressing processes involved in communication in Distributed Systems in detail. In a Message-based communication system, another vital issue is to name or address the processes that are involved in communication. The following are the two types of addressing schemes supported by the Message Proces
4 min read
Article Tags :
three90RightbarBannerImg