Communication and data serialization
As explained in the Microservice design principles subsection of Chapter 11, Applying a Microservice Architecture to Your Enterprise Application, requests to a microservices-based application can’t cause long chains of recursive microservices calls.
In fact, each call adds both a wait time and a communication time to the actual processing time, thus leading to unacceptable levels of overall response time, as shown in the following figure.
Figure 14.1: Tree of blocking RPC calls
Messages 1-6 are triggered by a request to the A microservice and are sent in sequence, so their processing times sum up to the response time. Moreover, once sent, message 1 from microservice A remains blocked until it receives the last message (6); that is, it remains blocked for the whole lifetime of the overall recursive communication process.
Microservice B remains blocked twice, waiting for an answer to a request it issued. The first time...