liveBook · Manning

Fault injection

As explained in Troubleshooting Java: Read, debug, and optimize JVM applications

A testing technique that deliberately introduces faults into a system to reproduce behavior that is otherwise difficult to observe.

Fault injection deliberately introduces a failure in a test environment to reproduce behavior that is difficult to observe otherwise. In service-oriented systems, it can reveal how services respond when another service or its communication channel fails. section 12.3.1 section 12.4

A service mesh makes it possible to shape communication for an investigation:

  • Configure a sidecar to disrupt communication and investigate how the system behaves. section 12.3.1
  • Use mirroring instead to copy requests to a test replica for debugging and profiling without affecting production. section 12.4

Reproducing a disrupted connection

To investigate a production-like case where communication between two services is often disrupted, configure the service-mesh sidecar to force that scenario in a test environment. section 12.3.1

Figure 12.13 You can use the side cart app of a service mesh to force the system into scenarios you want to investigate. Say you want to replicate a production case in which the communication is often disrupted between two services. You can easily configure a service mesh side cart app to force the execution into such a scenario to allow you to investigate.

The figure illustrates how a service-mesh sidecar can force communication scenarios for investigation. section 12.3.1

How Troubleshooting Java: Read, debug, and optimize JVM applications covers it

How deep it goes
Explains the purpose of fault injection and how to configure a service-mesh sidecar to induce communication failure.
Examples
Shows a sidecar disrupting communication between services to reproduce a production-like failure scenario.
What it assumes
Assumes a service-oriented system and introduces how service-mesh sidecars intercept communication.
What you can do after
Configure a service-mesh sidecar to simulate failed communication and investigate its effects on other services.
How it connects
Connects fault injection with service meshes, microservices, and mirroring as ways to investigate system behavior.

Also explained in

Compare how 2 books explain fault injection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java: Read, debug, and optimize JVM applications. The section links point to the parts of the book it draws on.