Horizonal vs Vertical Scaling | Stateless Servers | System Design in Hindi
Decode with Vipin
0:00 / 0:00
Horizonal vs Vertical Scaling | Stateless Servers | System Design in Hindi
108 просмотров · 4 дн. назад
Decode with Vipin
11 подписчиков
108 просмотров · 4 дн. назад
Is video mein aap seekhoge:
Ek server ke andar CPU, RAM, disk aur network card, aur load badhne par sabse pehle kya bharta hai
Vertical scaling (scale up): bina code change ke bada server, aur uski 4 deewarein: ceiling, price, single point of failure, upgrade downtime
Amdahl's law: 64 cores bhi kyun bekaar ho sakte hain, aur serial part chhota karke iska fix
Horizontal scaling (scale out): kai servers, load balancer, rolling upgrade, aur iski apni cost
Session aur cookie andar se: session id, hash map lookup, aur HttpOnly, Secure, SameSite flags
Stateful server ki problem: logout, khaali cart, local disk par photo, local cache, aur cron job jo 8 baar chalta hai
Sticky sessions: IP hash aur load balancer cookie, aur ye kyun fail hote hain (uneven load, crash, server add/remove)
Stateless servers: Redis session store, sliding expiry, memory ka napkin math, Redis replica, cart database mein
Signed token (JWT) ka option, short expiry aur refresh token
Baaki state bahar: object storage (S3), shared cache, job scheduler
Stateless hone ke fayde: freely add/remove, autoscaling, safe deploy, pets vs cattle
State ab bhi kahin rehti hai: Redis, database, object storage, aur WebSocket
Real systems mein kya chunein: app servers horizontal, database pehle vertical
#SystemDesign #SystemDesignInHindi #Scalability #StatelessArchitecture #HorizontalScaling