Microservices common patterns
In this section, we will analyze the fundamental patterns used in all microservices architectures whose description is not tied to a specific programming language or tool. Most of them concern microservice communication. Let’s start with common retry strategies.
Resilient task execution
Microservices can be moved from one machine to another to achieve better load balancing. They can also be restarted to reset some possible memory leaks or to solve other performance issues. During these operations, they may miss some messages sent to them, or they may abort some ongoing computation. Moreover, failure due to software bugs or hardware faults may occur, too.
Since microservices architectures are required to be reliable (almost zero downtime), they are usually redundant, and particular care is needed to detect faults and apply corrective actions. Therefore, all microservices architectures must provide mechanisms to both detect failures,...