Connection Pool Rate Control for Database Stability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database systems become unstable due to connection storms caused by a high rate of concurrent connection and disconnection requests from multiple applications, leading to overloading and performance degradation.
Innovation Solution
Implementing a connection rate control processing subsystem and authority to stagger and throttle the creation and destruction of connections, distributing the request rate over time to prevent overload and manage connection pools effectively.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple applications create a large number of connections to a database, then the database can handle more concurrent requests, but the database system becomes unstable due to connection storms
Solution Approach 1:
The system performs preliminary actions by pre-establishing connection pools and preparing connection management structures before connection storms occur. Connection pools are initialized with a predetermined number of connections ready for use, and management subsystems are pre-configured to handle connection requests, thereby avoiding the instability caused by sudden connection surges.
Solution Approach 2:
A connection management subsystem acts as an intermediary between applications and the database system. This intermediary layer controls and regulates connection creation, pooling, and destruction, preventing direct connection storms from reaching the database while still allowing high concurrent request handling through efficient connection allocation from the pool.
2Adaptability or versatility
If the database system handles a high rate of connection and disconnection requests, then more applications can access the database concurrently, but the system becomes overloaded and performance degrades
Solution Approach 1:
The connection pool maintains continuous availability of connections for application access. Instead of creating and destroying connections for each request, the pool keeps connections alive and reusable, ensuring continuous service to multiple applications without the performance degradation associated with frequent connection lifecycle operations.
Solution Approach 2:
The system recovers and reuses connections from the pool after they are no longer needed by applications. Rather than discarding connections after single use, the pool captures returned connections and makes them available for subsequent requests, thereby maintaining high concurrent access capability while minimizing the overhead of connection creation and destruction.
3Speed
If connections are created rapidly to meet demand, then application responsiveness is improved, but connection storm conditions occur causing system instability
Solution Approach 1:
Connections are pre-created and stored in the connection pool before they are needed by applications. This preliminary action ensures that when applications require connections, they can be allocated immediately from the pool without rapid creation, thus maintaining fast response speed while avoiding connection storms that would occur with on-demand creation during high demand periods.
Data Source
AI summary
Methods and system for managing resource connections are described. In one embodiment, an initial user request to access data stored at a resource is received. The initial user request is generated by an application of a plurality of applications having access to the resource. An existing connection from the application is utilized to provide the data to the application. A current user request to access data stored at the resource is received. Based on a determination that the existing connection is unavailable, the current user request is assigned to a waiter queue. A number of requests assigned to the waiter queue during a pre-defined time period is determined to exceed a threshold. A new connection from the application to the resource is created based on the availability of a further connection to the resource and the exceeding of the threshold.


