Problem Statement
Opening a new database connection for every request causes high latency and resource exhaustion. When many clients connect simultaneously, the database server can become overwhelmed, leading to slow responses and potential crashes.
This diagram shows the application server borrowing and returning connections from the connection pool, which manages open connections to the database server.
connection pooling in system design?pool = createPool(size=3) conn1 = pool.getConnection() conn2 = pool.getConnection() conn3 = pool.getConnection() conn4 = pool.getConnection()What happens when
conn4 is requested?Pass the test and this pattern moves unknown