Fault injection

Fault injection is a method that's used to test the application without having to wait for an actual fault to occur. It is very likely that latency or faults will occur in a distributed environment. It is difficult to envision the effects of actual faults/latency while an application is being developed. Most of the time, it is the reaction of faults/latencies that triggers application code changes, which means new releases of the application have to be made. 

While developing enterprise applications, typically, we separate small teams and make them develop microservices independent of each other. It is likely that different teams may introduce timeouts in their code, which may introduce an anomaly. For example, let's say we introduce a 7-second delay that will not affect the reviews service due to there being a 10-second hardcoded timeout between the reviews and ratings service. productpage calls the reviews service and throws an error after 6 seconds, even though our timeout was set to 7 seconds. The http delay uncovered different unexpected service behaviors. Fault injection is a method that can uncover such anomalies, which we will see with the help of an example of injecting an http delay and abort faults.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.218.230