Microservices Multi-Architectural Patterns (External vs Internal Architectures)

Mehmet Ozkaya
4 min readMar 22, 2024

--

When we talk about building software with microservices, we’re diving into a world that’s all about breaking things down into smaller pieces. How these microservices work together on the outside can be quite different from how they’re set up on the inside.

External vs Internal Architecture of Microservices

On the Outside

Imagine you’ve got a bunch of apps and services that need to talk to each other. There’s something like a digital traffic cop called an API Gateway that helps manage all the conversations between them. Each microservice, whether it’s for showing products, managing your shopping cart, or processing orders, has its own little database and does its job independently.

Get Udemy Course with limited discounted coupon — .NET 8 Microservices: C# 12, DDD, CQRS, Vertical/Clean Architecture.

On the Inside

Now, if we zoom into any of these microservices, we see they can be set up in different ways. Some might be straightforward, handling tasks from top to bottom. Others might be more like a well-organized team, with different sections taking care of specific tasks. And then there are those that are super organized, with everything in its place, making it easier to manage and update later.

Meet the Microservices

Catalog and Basket: Keeping It Simple

Our Catalog and Basket services are like the folks who prefer a straightforward approach.

They take a task, break it into smaller chunks, and handle each piece one at a time. It makes things quick and easy to look after.

Discount: Sticking to the Basics

Then there’s our Discount service, which likes to keep things classic. It’s got different layers, like an onion, where each layer has a specific job, from talking to users to storing data. It’s a tried-and-true way to keep everything in order.

Ordering: The Organized One

Our Ordering service is the one that loves to have everything just so. It’s got a place for everything, from the core rules of how orders work to the nitty-gritty of saving order details. It’s a bit more work to set up, but it makes life easier down the line.

A Mix-and-Match World

What’s cool about microservices is that there’s no one-size-fits-all. You can mix and match different setups based on what each service needs to do. It’s all about using the right tool for the job, making sure each microservice is as simple or complex as it needs to be.

Why It Matters

This way of doing things — breaking a big app into microservices, each with its own style and setup — makes it easier to handle, update, and grow your software over time. It’s like having a toolbox where you pick the best tool for each task, making sure everything runs smoothly and efficiently.

So, as we build and evolve our software, we get to enjoy the creativity and flexibility that come with microservices. It’s a journey of finding the best paths, learning, and adapting as we go, all to create software that’s robust, flexible, and ready to grow with our needs.

Get Udemy Course with limited discounted coupon — .NET 8 Microservices: C# 12, DDD, CQRS, Vertical/Clean Architecture.

This is step-by-step development of reference microservices architecture that include microservices on .NET platforms which used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12.

--

--

Mehmet Ozkaya
Mehmet Ozkaya

Written by Mehmet Ozkaya

Software Architect | Udemy Instructor | AWS Community Builder | Cloud-Native and Serverless Event-driven Microservices https://github.com/mehmetozkaya

No responses yet