It is very important to understand how failures happen in order to know how to prevent them. Let's start thinking about common practices in monolithic applications that are routinely taken for microservices architecture. This example will help us understand how to react before the failure.
A common approach is to place the entire structure of an application in a single repository. What I mean is that software code, database, cache, and all the other features of the application, will be on the same machine. I've lost count of the number of times I have come across this scenario.
The following image shows that the cache, database, API, and Business Logic layer are in the same place. At first glance, there's nothing wrong with that. With everything in the same machine, problems such as latency, packet loss, and complexity to deploy are minified...