0
0
Microservicessystem_design~12 mins

Rollback strategies in Microservices - Architecture Diagram

Choose your learning style9 modes available
System Overview - Rollback strategies

This system demonstrates how to safely rollback a microservices deployment when a new version causes issues. Key requirements include minimizing downtime, preserving data integrity, and allowing quick recovery to the previous stable version.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  +-------------------+
  |                   |
Service V2          Service V1
  |                   |
  v                   v
Database <---------- Cache
  |
  v
Message Queue
  |
  v
Monitoring & Alerting
  |
  v
Rollback Controller
Components
User
client
Sends requests to the system
Load Balancer
load_balancer
Distributes incoming traffic between service versions
API Gateway
api_gateway
Routes requests to appropriate microservice versions
Service V2
service
New version of the microservice handling requests
Service V1
service
Previous stable version of the microservice
Database
database
Stores persistent data for services
Cache
cache
Speeds up data retrieval for services
Message Queue
queue
Handles asynchronous communication and rollback commands
Monitoring & Alerting
monitoring
Detects issues and triggers rollback if needed
Rollback Controller
controller
Manages rollback process and switches traffic back to stable version
Request Flow - 12 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayService V2
Service V2Cache
CacheService V2
Service V2Database
DatabaseService V2
Service V2Cache
Service V2User
Monitoring & AlertingRollback Controller
Rollback ControllerLoad Balancer
Rollback ControllerMessage Queue
Failure Scenario
Component Fails:Service V2
Impact:New service version causes errors or slow responses, degrading user experience
Mitigation:Monitoring detects failures and triggers Rollback Controller to switch traffic back to stable Service V1 version, ensuring system stability
Architecture Quiz - 3 Questions
Test your understanding
Which component is responsible for directing user requests to the correct microservice version?
AAPI Gateway
BLoad Balancer
CRollback Controller
DMessage Queue
Design Principle
This architecture uses traffic routing and monitoring to enable quick rollback of microservice versions. It isolates new versions behind an API Gateway and Load Balancer, allowing seamless switch back to stable versions without downtime. Monitoring triggers automated rollback commands, ensuring system reliability and user experience.