#Architecture question

1 messages · Page 1 of 1 (latest)

dense crown
#

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

viral scaffoldBOT
#

This post has been reserved for your question.

Hey @dense crown! 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.

lunar vessel
dense crown
lunar vessel
#

So you are asking about whether you can use DDD for monoliths?

#

or for moduliths

fathom bay
#

I think the question is just "Should I deploy 1 or 4 processes?"

dense crown
#

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

lunar vessel
#

microservices have advantages and disadvantages

dense crown
#

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

lunar vessel
#

yeah, it is definitely an overhead that's often not worth it

fathom bay
#

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.

lunar vessel
#

Also, note that unless you are actually working on a big scale, performance will likely be worse with microservices

fathom bay
#

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.

lunar vessel
#

...and the network connection is by far not the only thing that can go wrong there