A company wants to migrate its monolithic application to a cloud-native architecture on Kubernetes. The application currently uses a shared database and communicates via internal HTTP calls. Which design pattern should be applied first to increase resilience and enable independent scaling of components?
Trap 1: Adopt CQRS pattern to separate reads and writes
CQRS is for query optimization, not migration.
Trap 2: Implement database-per-service pattern
This is a later step after decomposition.
Trap 3: Deploy a sidecar container for each service
Sidecar is for cross-cutting concerns, not migration.
- A
Adopt CQRS pattern to separate reads and writes
Why wrong: CQRS is for query optimization, not migration.
- B
Use the strangler fig pattern to gradually replace monolith functionality
Allows incremental migration with minimal risk.
- C
Implement database-per-service pattern
Why wrong: This is a later step after decomposition.
- D
Deploy a sidecar container for each service
Why wrong: Sidecar is for cross-cutting concerns, not migration.