What are the major Microservices Anti-Patterns?
Topic: microservices, Anti-Patterns. Level: Hard.
Answer
- **Distributed Monolith**: services so tightly coupled they must deploy together — worst of both worlds.
- **Shared Database**: multiple services on one schema, re-coupling them.
- **Nano-services / too fine-grained**: excessive chatter and ops overhead.
- **Chatty communication**: many fine-grained sync calls per request (latency, cascading failure).
- **No API versioning**: breaking consumers on change.
- **Synchronous everywhere**: coupling availability; no async where it fits.
- **Ignoring the data problem**: assuming distributed ACID exists.
- **Microservices without the org/automation** to run them (premature adoption).
```text
Smell -> Fix
distributed monolith -> define bounded contexts; async events; independent deploy
shared database -> database-per-service; integrate via API/events
chatty sync calls -> aggregate (BFF/API composition); go async where possible
no versioning -> /v1 URIs, backward-compatible schema evolution
sync everywhere -> events/queues for commands; sync only for needed queries
```