liveBook · Manning

Redundancy

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

Redundancy is the use of multiple equivalent instances or components so operation can continue when one fails.

Redundancy keeps a microservice available by running multiple equivalent instances. A load balancer distributes requests across them, while Kubernetes replaces failed instances. section 11.1 section 11.4.4

Implement redundancy by combining these operational pieces:

  • Run multiple instances of each microservice, usually at least three. section 11.4.4
  • Place the instances behind a load balancer that shares incoming requests across them. section 11.4.4
  • Let the load balancer redirect requests when an instance fails while Kubernetes restarts it. section 11.4.4
  • Log every failure and investigate its cause; resilience does not make failures acceptable. section 11.4.4

Set three gateway replicas

In a Kubernetes Deployment manifest, change the gateway's replicas property from one to three, then apply the updated YAML with kubectl apply. Kubernetes maintains the multiple gateway instances. section 11.4.4

Figure 11.12 A load balancer distributes incoming requests across multiple redundant instances of a microservice.

Use the infrastructure diagram to follow how a load balancer distributes incoming requests across redundant microservice instances. section 11.4.4

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Explains replication, load balancing, Kubernetes restarts, and deployment configuration, while deferring performance-focused replication.
Examples
Uses a gateway Deployment with three replicas and a load-balanced microservice infrastructure diagram.
What it assumes
Assumes basic Kubernetes Deployments and introduces replication through a Deployment replicas property.
What you can do after
Operate/configure Kubernetes Deployments with multiple replicas and diagnose failures without losing service continuity.
How it connects
Connects redundancy with microservices, replication, load balancing, Kubernetes, fault tolerance, health checks, and debugging.

Also explained in

Compare how 6 books explain redundancy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.