0
0
Microservicessystem_design~12 mins

Parallel running in Microservices - Architecture Diagram

Choose your learning style9 modes available
System Overview - Parallel running

Parallel running is a deployment strategy where the new version of a microservice runs alongside the old version. Both versions handle requests simultaneously to ensure smooth transition and minimize risk. This approach allows comparing outputs and rolling back easily if issues arise.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  +-------------------+
  |                   |
Old Service         New Service
  |                   |
  v                   v
Database            Database
  |                   |
  +--------+----------+
           |
          Cache
Components
User
client
Sends requests to the system
Load Balancer
load_balancer
Distributes incoming requests between old and new service versions
Old Service
service
Handles requests using the current stable version
New Service
service
Handles requests using the new version running in parallel
Database
database
Stores persistent data accessed by both service versions
Cache
cache
Speeds up data retrieval for both services
Request Flow - 13 Hops
UserLoad Balancer
Load BalancerOld Service
Load BalancerNew Service
Old ServiceCache
CacheOld Service
Old ServiceDatabase
DatabaseOld Service
Old ServiceUser
New ServiceCache
CacheNew Service
New ServiceDatabase
DatabaseNew Service
New ServiceUser
Failure Scenario
Component Fails:New Service
Impact:New service stops responding or returns errors, but old service continues serving requests normally.
Mitigation:Load balancer detects failure and routes all traffic to old service until new service is fixed or rolled back.
Architecture Quiz - 3 Questions
Test your understanding
What is the main role of the load balancer in parallel running?
ATo distribute requests between old and new service versions
BTo store user data
CTo cache database queries
DTo update the database schema
Design Principle
Parallel running allows safe deployment by running new and old service versions side by side. It reduces risk by enabling comparison and easy rollback without downtime.