Microservices are trendy, but they introduce massive complexity. Don't start with microservices.
The Monolith
One code base, one database, one deployment.
Pros: Easy to develop, test, and deploy. ACID transactions.
Cons: Tight coupling. Hard to scale specific parts.
Microservices
Small, independent services communicating over network (HTTP/gRPC).
Pros: Scale independently. Different tech stacks per service. Fault isolation.
Cons: Distributed data (no joins). Network latency. Operational complexity (K8s required).
When to switch?
Switch to microservices when:
- You have 50+ developers working on the same repo.
- Different parts of the app have vastly different scaling needs.
- You need to isolate high-risk components.
Communication Patterns
- Sync: REST/gRPC. Simple but fragile.
- Async: Message Queues (RabbitMQ, Kafka). Resilient but complex.