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
JavaBot
JavaBot3w ago
This post has been reserved for your question.
Hey @IamMax420! Please use /close or the Close Post button 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.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st3w ago
What do you mean with structuring microservices like a monolith?
IamMax420
IamMax420OP3w ago
I meant choosing the monolithic architectural pattern instead of microservices
dan1st
dan1st3w ago
So you are asking about whether you can use DDD for monoliths? or for moduliths
Madjosz
Madjosz3w ago
I think the question is just "Should I deploy 1 or 4 processes?"
IamMax420
IamMax420OP3w ago
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
dan1st
dan1st3w ago
It can be microservices have advantages and disadvantages
IamMax420
IamMax420OP3w ago
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
dan1st
dan1st3w ago
yeah, it is definitely an overhead that's often not worth it
dan1st
dan1st3w ago
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.
Madjosz
Madjosz3w ago
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.
dan1st
dan1st3w ago
Also, note that unless you are actually working on a big scale, performance will likely be worse with microservices
IamMax420
IamMax420OP3w ago
yeah that makes sense
Madjosz
Madjosz3w ago
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.
dan1st
dan1st3w ago
...and the network connection is by far not the only thing that can go wrong there
JavaBot
JavaBot3w ago
💤 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.

Did you find this page helpful?