Microservices vs multi-layered architecture
Thanks for sharing!
In conclusion, both monolithic and microservices structures have their advantages and disadvantages, and choosing the right option depends on your deadlines, development team, and the loads which your app will face after deployment.
Be sure that the monolithic structure is good and enough for your app if any of the following options is about you:
Small app. Your app is quite simple and does not meet serious loads after deployment or it is already in production but does not face any issues with performance yet.
Quick launch. You have a fresh idea or a startup that should be launched as soon as possible because at the moment it does not have any competitors and your project will have all chances to become successful. Tight deadlines for idea implementation. Limited budget.
Proof of concept. You want to check whether your idea is feasible and useful by building a basic product for your target audience.
No experience with microservices. Your team is not big enough to separate people for designing separate microservices or your team has no experience in building them. Of course, it is better to start learning and practising microservices but the features that should be the skeleton of your app are not the best opportunity to do it.
Monolithic vs. microservices architecture is an easier question to answer if you know in what cases to choose the latter.
Complex app. Your app is complex enough for integrating new tools or it experiences issues with the load that cannot be solved by vertical scaling or it is unprofitable in this case.
Plan to grow and scale the app. Your project experiences a stable load growth and you plan to integrate new tools, but there are chances that the app will reach a critical point when scaling issues may appear.
Experience with microservices. There are developers in your team who are experienced in designing and deploying microservices to production and you are sure that there will be a part of the team who will support and develop the main app while they are working on microservices.
Utopia. You have enough money, loyal managers, and extended deadlines.
Now the monolith vs. microservices choice should be easier to make.
Microservice and layered architecture are a little bit different things. Microservice architecture it’s about how your application is constructed, what components (services) it has and how these services communicate with each other, how they are developed, deployed and so on.
Multi-layered architecture it’s about logical dividing application into layers where every layer has its own logical function (presentation, domain and so on). Very often multi-layered architecture is related to monolithic architecture and service design.
According to your description, you aren’t going to break down your layers, your architect wants to split logic into different services. These two architecture styles can be used together. For instance, you can have 3 services and every service can have presentation, domain and service layers. If your current layers in one service are heavy enough it makes sense to split them out making development and testing easier. Backend for frontend style has also its benefits especially if you want to add a mobile app.
About this
Is multi-layered architecture out of fashion already?
No, they are used both but with microservices as a rule layers should be much thinner than in monolithic application.
What benefits and problems can bring such architecture design for my application?
I recommend you look at comparison between microservice and monolithic architecture styles and this post. To divide or not you should consider the size and complexity of your project, the size of your team. Dividing has to bring benefits to the whole application making development easier. The Monolithic application has its own benefits and up to some size of the project, it can be a good decision. Of course, it’s a nightmare working with a huge monolithic application as well as with one hundred very small (nano) services.