0
0
HLDsystem_design~12 mins

Why API design affects system usability in HLD - Architecture Impact

Choose your learning style9 modes available
System Overview - Why API design affects system usability

This system explains how the design of an API impacts the ease and efficiency with which developers and users interact with a software system. Key requirements include clear communication, consistent behavior, and fast response times to ensure a positive user experience.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  v
API Service
  |
  +----------------+
  |                |
Cache <---------- Database
  |
  v
Response
Components
User
client
Initiates requests to the system using the API
Load Balancer
load_balancer
Distributes incoming requests evenly to API Gateway instances
API Gateway
api_gateway
Handles routing, authentication, and request validation
API Service
service
Processes API requests, applies business logic, and interacts with data stores
Cache
cache
Stores frequently accessed data to reduce latency and load on the database
Database
database
Stores persistent data for the system
Response
response
Delivers processed data back to the user
Request Flow - 11 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayAPI Service
API ServiceCache
CacheAPI Service
API ServiceDatabase
DatabaseAPI Service
API ServiceCache
API ServiceAPI Gateway
API GatewayLoad Balancer
Load BalancerUser
Failure Scenario
Component Fails:API Gateway
Impact:Requests cannot be routed or validated, causing all API calls to fail and users to experience errors.
Mitigation:Deploy multiple API Gateway instances with health checks and automatic failover to ensure availability.
Architecture Quiz - 3 Questions
Test your understanding
Which component is responsible for checking if requested data is already stored to reduce database load?
AAPI Gateway
BCache
CLoad Balancer
DDatabase
Design Principle
This architecture highlights how good API design, including clear routing, validation, and caching, directly improves system usability by ensuring fast, reliable, and consistent responses to users.