Yesterday, in our previous post, we did a light compare between HTTP and Middleware based architectures for Microservices. Today we’ll start focusing on Middleware based architectures and show some detail about the why’s and the patterns available to developers.
Why Middleware Based
The Middleware is a form of Transport, rather than addresses you think in named channels and the endpoints within that channel decides how they consume the messages, 1:1, 1:n or randomly-selected 1:n.
The goal is to promote an architecture that is scalable, easy to manage and easy to operate. These goals are achieved by:
- Promoting application design that breaks complex applications into simple single-function building blocks that’s easy to develop, test and scale
- Application building blocks are not tightly coupled and can scale independently of other building blocks
- The middleware layer implementation is transparent to the application – network topologies, routing, ACLs etc. can change without application code change
- The brokers provide a lot of the patterns you need for scaling – load balancing, queuing, persistence, eventual consistency, failover, etc.
- Mature brokers are designed to be scalable and highly available – very complex problems that you do not want to attempt to solve on your own
- Fewer moving parts, less coupled to infrastructure layers and scalable across multiple clusters
There are many other reasons, but for me, these are the big-ticket items – especially the 2nd one.
[Read More]