Перейти к содержимому

Connection Pooling & Keep-Alive | Every Request Opens a New DB Connection? | System Design in Hindi

Decode with Vipin

0:00 / 0:00

Connection Pooling & Keep-Alive | Every Request Opens a New DB Connection? | System Design in Hindi

17 просмотров · 7 дн. назад
Decode with Vipin
19 подписчиков
17 просмотров · 7 дн. назад
Is video mein hum ek online shop ke andar jaakar dekhenge ki ek database connection kholne mein andar kya kya hota hai, connection pool andar se kaise kaam karta hai, pool ka sahi size kaise nikaalte hain, aur bada pool database ko aur slow kyun kar deta hai. Is video mein aap seekhoge: Ek database connection ki asli cost: TCP handshake, TLS handshake, startup aur authentication, aur Postgres ka process per connection "Too many connections" kahan se aata hai: max_connections limit aur memory per connection Keep-alive (persistent connection) aur ek connection share karne ki problem Connection pool andar se: idle list, in use list, borrow, return, rollback on return, wait queue, connection timeout Pool ke saath aur bina pool ke latency aur CPU ka fark, numbers mein Request threads vs pool connections, aur wait queue ek backpressure signal kyun hai Pool settings: minimum idle, maximum size, connection timeout, idle timeout, max lifetime (HikariCP, pg-pool, Go) Pool size kaise nikaalein: Little's Law, CPU cores ka formula, load test, aur servers x pool size ka trap Deploy ke time connection storm aur uska fix PgBouncer: session, transaction aur statement mode, aur transaction mode ki limitation ka fix Stale connections, connection leak aur pool exhaustion: har ek ka fix Pool ko monitor kaise karein: active, idle, waiting, aur wait time Redis aur HTTP clients mein bhi connection pool Decode System Design full series [   • Decode System Design  ] #SystemDesign #SystemDesignInHindi #ConnectionPooling #Database #BackendEngineering