0
0
Microservicessystem_design~12 mins

Why microservices exist - Architecture Impact

Choose your learning style9 modes available
System Overview - Why microservices exist

This system shows why microservices exist. It breaks a big application into smaller, independent parts. Each part does one job well. This helps teams work faster, fix problems easier, and scale parts that need more power.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  +-------------------+-------------------+-------------------+-------------------+
  |                   |                   |                   |                   |
Service A          Service B           Service C           Service D
  |                   |                   |                   |
Database A         Database B          Database C          Database D
  |                   |                   |                   |
Cache A            Cache B             Cache C             Cache D
Components
User
user
Person using the application
Load Balancer
load_balancer
Distributes user requests evenly to API Gateway
API Gateway
api_gateway
Routes requests to the correct microservice
Service A
service
Handles one specific business function independently
Service B
service
Handles another specific business function independently
Service C
service
Handles a different business function independently
Service D
service
Handles yet another business function independently
Database A
database
Stores data for Service A
Database B
database
Stores data for Service B
Database C
database
Stores data for Service C
Database D
database
Stores data for Service D
Cache A
cache
Speeds up data access for Service A
Cache B
cache
Speeds up data access for Service B
Cache C
cache
Speeds up data access for Service C
Cache D
cache
Speeds up data access for Service D
Request Flow - 11 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayService A
Service ACache A
Cache AService A
Service ADatabase A
Database AService A
Service ACache A
Service AAPI Gateway
API GatewayLoad Balancer
Load BalancerUser
Failure Scenario
Component Fails:Database A
Impact:Service A cannot write or read fresh data; cache may serve stale data
Mitigation:Use database replication and fallback to read replicas; cache serves stale data temporarily
Architecture Quiz - 3 Questions
Test your understanding
Why does the system use multiple small services instead of one big service?
ATo reduce the number of databases
BTo allow independent development and scaling of parts
CTo make the system slower
DTo avoid using caches
Design Principle
This architecture shows how microservices break a big app into smaller parts. Each part can be built, fixed, and scaled alone. This helps teams work faster and keeps the system flexible and reliable.