Deploying microservices in a distributed environment can present a number of challenges, chief among them being the challenge of getting chatty microservices to communicate effectively. The more you scale your system (load and connections) within and across different environments, the harder this challenge can get, especially if you’ve started with a REST-based communication pattern. Using messaging between microservices, however, can help you overcome these challenges and provide several key benefits.
The 5 key benefits of messaging when deploying microservices:
- Simple, scalable connectivity
- Simple, high availability
- Simple producer/consumer scalability
- The enablement of publish/subscribe, message filtering, routing and fanout
- Message rate and consumer availability decoupling
You may be wondering how REST/HTTP-based communication stacks up against messaging in enabling these benefits. In short, REST is an alternative to messaging and can deliver benefits 1-3 (above), but it doesn’t enable benefits 4 and 5.
Let’s take up each benefit in turn, and we’ll cover the REST vs.… Read the rest