12-Sep-2022 by Damian Maclennan

Mullet Microservices - REST at the front and messaging at the back

blog-details-image

This is a pattern I’ve had a lot of success with across a few projects. One day I jokingly called it “Mullet Microservices” - REST in the front, messaging in the back.

I tweeted it and it got a whole lot of engagement, and every time I’ve said it there’s some laughs. So I’m sticking with the name.

It’s fairly simple, services with a public facing REST API behind a load balancer, with some routing rules to forward requests to the correct service.

Each service has its own database, containing all the data it needs to “own” and handle any request.

A service can raise events or send commands to other services via a messaging backplane such as RabbitMQ, Azure Service Bus, or even Redis.

Other services receive messages and update their own internal representations (data) or perform an action and raise a completion event.

This pattern allows you to start simply, and build out horizontally as you uncover new requirements and build new features. You can also scale services under heavier load.

You can learn more about how to use this pattern in the Building Modern Microservices Course