Dynamic Connection Pool Adjustment for Database Resource Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In database systems, the size of the connection pool often remains large due to developers setting high minimum database connections to ensure access, leading to many unused connections and wastage of computing resources during low demand periods, as they are unaware of other applications' usage patterns.
Innovation Solution
A connection manager with short-term, long-term, and spike modules dynamically adjusts the connection pool size based on usage patterns, sampling at different intervals to match current demand, thereby optimizing the number of connections.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the connection pool size is set large to meet high demand periods, then the system can handle peak loads, but during low demand periods many connections remain unused consuming valuable computing resources
Solution Approach 1:
The patent implements dynamic adjustment of connection pool size based on real-time usage patterns. The system continuously monitors connection usage metrics and automatically scales the pool size up during high demand and down during low demand, transforming the static connection pool into a dynamic resource that adapts to changing system conditions, thereby resolving the contradiction between maintaining availability and reducing resource waste
Solution Approach 2:
The system employs feedback mechanisms by monitoring connection usage patterns and using this information to adjust the connection pool size. The usage metrics feed back into the connection management system, which then makes informed decisions about pool scaling, creating a closed-loop control system that balances availability and resource efficiency based on actual demand
2Ease of operation
If developers set high minimum database connections to ensure access, then application access is guaranteed, but the connection pool size remains large leading to resource wastage
Solution Approach 1:
The connection management system operates autonomously by automatically monitoring usage patterns and adjusting pool size without requiring manual developer intervention. The system serves itself by making intelligent decisions about connection pool configuration based on observed usage, eliminating the need for developers to manually set high minimum connections while still ensuring adequate access availability
3Productivity
If the connection pool size is increased to meet demand, then access availability improves, but computing resources are consumed during low demand periods
Solution Approach 1:
The system dynamically adjusts connection pool size based on real-time usage patterns. The pool expands during high productivity periods when access throughput is needed and contracts during low demand periods, creating a dynamic resource allocation system that matches computing resource consumption to actual productivity requirements
Data Source
AI summary
A method includes calculating first connection usage information based on a first number of connections being used in a connection pool over a first time interval and adding a first number of database connections to the connection pool based on determining that the first connection usage information satisfies a first usage threshold. Additionally, the method includes calculating second connection usage information based on a second number of connections being used in the connection pool over a second interval. The second interval has been previously reset responsive to adding the first number of database connections to the connection pool. The method also includes determining whether to adjust the number of database connections in the connection pool based on the second connection usage information.


