Chapter 4: How to Use NATS in a Microservice Architecture
In the first part of this book, we discussed the evolution of distributed systems, the microservice architecture, messaging technologies, and NATS messaging in detail as separate topics. In this second part of this book, we will start by using what we learned previously to design an effective microservice architecture by exploring these topics further and the correlation among them in detail.
As we discussed in Chapter 2, Why Is Messaging Important in the Microservice Architecture?, microservice architecture-based platforms have two main message flows called North-South traffic and East-West traffic. Sometimes, East-West traffic is also called inter-service communication in a microservice architecture. In this chapter, we will discuss these messaging flows in detail and how NATS can be used for inter-service communication within the microservice architecture. We are going to cover the following main topics in this chapter...