# Fault Tolerance in Microservices Architecture ![rw-book-cover](https://miro.medium.com/v2/da:true/resize:fit:1200/0*q0xzalEL7EECfWtd) ## Metadata - Author: [[Meherban Singh]] - Full Title: Fault Tolerance in Microservices Architecture - Category: #articles - Summary: Microservices architecture breaks applications into smaller, independent services that communicate through APIs, enhancing development agility and scalability. Fault tolerance is crucial in this setup, allowing systems to continue functioning despite individual service failures. Key strategies for achieving fault tolerance include designing for failure, decentralization, and implementing redundancy and isolation. - URL: https://medium.com/cloud-native-daily/fault-tolerance-in-microservices-architecture-patterns-principles-and-techniques-explained-20cfa3d7f98f ## Highlights - Fundamentally, fault tolerance means that a system can continue to operate and provide service even if something goes wrong. ([View Highlight](https://read.readwise.io/read/01jk1w4efpstjj604a4qe56m4h)) - Why is fault tolerance so important in microservice architectures? In this type of setup there are many different services that all work independently. This means that each service can experience its own failure, creating a domino effect that can bring down the entire system. not good. ([View Highlight](https://read.readwise.io/read/01jk1w53hhwybmref8wdpkdmvr)) - **A. Partition:** Isolate critical services from non-critical services to prevent failure of one service from impacting others. Implementing a bulkhead limits the blast radius of the fault and prevents it from spreading throughout the system. For example, separating user authentication and payment processing into separate services prevents authentication errors from impacting payment processing services. ([View Highlight](https://read.readwise.io/read/01jk1w70bprddnhf2v40tbgg07)) - **B. Circuit breaker:** This is a pattern for detecting and handling service outages. If the service fails repeatedly, the circuit breaker will trip and redirect the request to an alternative service or return a predefined fallback response. This pattern helps prevent cascading failures and gracefully degrades systems when services become unavailable. ([View Highlight](https://read.readwise.io/read/01jk1w7jqmn56rvjfm42qq6v0q)) - **C. Graceful Degradation:** This means that services should be designed so that their functionality degrades gracefully in the event of a failure. Instead of failing completely, the service may degrade its functionality and provide a limited feature set. For example, an e-commerce application may disable non-essential features. Designing for failures is like implementing protection switches, and enabling soft degradation ensures that your microservices architecture is fault-tolerant and handles failures gracefully. ([View Highlight](https://read.readwise.io/read/01jk1w82kfv2a2a30jcc65cars))