Monolith vs microservices?
Options
- A monolith is always the worse design choice
- A monolith deploys as one; microservices apart (Correct option)
- Microservices share one database by definition
- They are two different programming languages
Answer
A monolith is one deployable application; microservices are many small services deployed independently that talk over the network
Why
Monolith: all features (users, orders, payments) live in one codebase and are deployed together. Simple to develop, test and deploy at first.
Microservices: each feature area is its own small app with its own deployment (and often its own database), communicating via HTTP or messages. Teams can work and scale independently, at the cost of much more operational complexity.
Remember
Monolith = one app. Microservices = many small apps.