0
0
Microservicessystem_design~12 mins

Incremental migration plan in Microservices - Architecture Diagram

Choose your learning style9 modes available
System Overview - Incremental migration plan

This system shows how to gradually move from a monolithic application to microservices. The goal is to keep the system working during migration, reduce risks, and improve scalability step-by-step.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  +-------------------+-------------------+
  |                   |                   |
Monolith Service 1  Microservice A     Microservice B
  |                   |                   |
Database (Monolith)  Database A         Database B
  |                   |                   |
Cache (Shared)     Cache A             Cache B
Components
User
client
End user sending requests
Load Balancer
load_balancer
Distributes incoming requests evenly to API Gateway instances
API Gateway
api_gateway
Routes requests to monolith or microservices based on migration status
Monolith Service 1
service
Original monolithic application handling some features
Microservice A
service
New microservice handling a migrated feature
Microservice B
service
Another new microservice handling another migrated feature
Database (Monolith)
database
Original monolith database storing legacy data
Database A
database
Database for Microservice A
Database B
database
Database for Microservice B
Cache (Shared)
cache
Shared cache used by monolith and microservices for fast data access
Cache A
cache
Cache dedicated to Microservice A
Cache B
cache
Cache dedicated to Microservice B
Request Flow - 12 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayMonolith Service 1
API GatewayMicroservice A
Microservice ACache A
Microservice ADatabase A
Monolith Service 1Cache (Shared)
Monolith Service 1Database (Monolith)
Microservice BCache B
Microservice BDatabase B
API GatewayLoad Balancer
Load BalancerUser
Failure Scenario
Component Fails:Database A
Impact:Microservice A cannot read or write data, causing feature unavailability. Cache may serve stale data but updates fail.
Mitigation:Use database replication and failover to standby database. Implement circuit breaker in microservice to degrade gracefully.
Architecture Quiz - 3 Questions
Test your understanding
Which component decides whether to send a request to the monolith or a microservice?
ACache
BAPI Gateway
CLoad Balancer
DDatabase
Design Principle
This architecture shows how to migrate a monolith to microservices step-by-step by routing requests through an API Gateway. It uses caching to reduce database load and isolates databases per microservice to improve scalability and fault tolerance.