Architecture question
If I'm planning on having 3-4 services in my project, is it reasonable to structure it as a single monolith in a DDD style instead of going with microservices where I would have these 3-4 separate services, each DDD? I feel like the latter would add too much complexity
16 Replies
⌛ This post has been reserved for your question.
Hey @IamMax420! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
What do you mean with structuring microservices like a monolith?
I meant choosing the monolithic architectural pattern instead of microservices
So you are asking about whether you can use DDD for monoliths?
or for moduliths
I think the question is just "Should I deploy 1 or 4 processes?"
I'm asking if, in a situation where I'm planning to have just 3-4 services, it would be better to have a single monolith instead of using microservices
It can be
microservices have advantages and disadvantages
I asked because I wanted to learn DDD and came up with a project idea that would involve microservices, then started coding it up and it's already looking like hell
becuase I wanted to use DDD on every service
but now I feel like that might be an overkill
yeah, it is definitely an overhead that's often not worth it
You might want to read https://martinfowler.com/articles/microservice-trade-offs.html
martinfowler.com
Microservice Trade-Offs
The microservices architecture can be useful, but to know if it's suitable in your context you need to understand its costs and benefits.
If you use the same codebase and the same resources then it might be a good idea to have only onr monolith. If your services need to be independently deployable/updateable then having them as separate services is the better idea.
Also, note that unless you are actually working on a big scale, performance will likely be worse with microservices
yeah that makes sense
In a monolith you can (mostly) always be sure that the other service will be available. For Microservices every call can already fail because there is likely network or at least socket connection involved.
...and the network connection is by far not the only thing that can go wrong there
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.