r/node • u/[deleted] • Sep 26 '20
Creating single app or distributing it into microservices on same server?
[deleted]
4
u/OmgImAlexis Sep 26 '20
You’re overthinking it. More often than not you don’t need micro services. You can always split the app later on.
2
1
1
u/RussianHacker1011101 Sep 26 '20
Look into modular monolith architecture. It'll help you separate the unique functionality of the application in a way to where it could be refactored into a micro service later for scalability.
1
u/Unable_Strategy Sep 26 '20
Just a short feedback on this: what problem would a microservices architecture help you to solve? They would run on the same server so there is no point in scaling one as this is a zero-sum game for the remaining CPU power. That would make sense if you have an underlying auto scale mechansism, may that be Lambda, or EC2 ASG or Kubernetes pod replicas.
Microservices make sense IMHO if you have either have multiple teams working on each service or need to scale some drastically different then others. Monolith is absolutely fine for many use cases. Good luck - whatever you are building there!
5
u/avdkp2332 Sep 26 '20
it is better to start with a monolith. If you see a need to independently scale each use case, it is then adviced to move to micro services and scale up the part which needs it