Connection Pool Double-Wait for Multi-Tenant Database Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional connection pools in database environments face inefficiencies due to the high computational cost of creating connection objects and the complexity of repurposing connections, especially in multi-tenant and sharded database systems, where connection initialization and attribute changes are resource-intensive and time-consuming.

Innovation Solution

The implementation of a double-wait functionality in connection pools, which first checks for and waits for an existing connection with exact desired attributes before resorting to creating a new connection or repurposing another, along with connection labeling and sharding support, to optimize resource reuse and reduce initialization costs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a new connection is created when no suitable connection is found in the pool, then the connection request is satisfied, but the computational cost and time increase significantly

Engineering Contradiction:
Improveconnection availabilityVSAvoidconnection initialization time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system pre-establishes multiple database connections and maintains them in a connection pool before they are needed. This preliminary action ensures that when applications need connections, ready-made connections are immediately available, eliminating the time-consuming process of creating connections on-demand while ensuring connection availability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The connection pool dynamically manages connections by automatically creating new connections when the pool capacity is not reached and removing connections when the maximum size is exceeded. This dynamic behavior allows the system to adapt to varying connection demands while maintaining optimal resource utilization, balancing connection availability with computational efficiency.

Inventive Principle:
Principle #15Dynamics

2Productivity

If connection attributes are changed to repurpose connections for different tenants or shards, then connection reuse is enabled, but the complexity and resource cost of attribute modification increase

Engineering Contradiction:
Improveconnection reuse efficiencyVSAvoidconnection management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments connections by assigning specific attributes to identify which tenant or shard each connection serves. This segmentation allows the connection pool to efficiently match connections to requests based on these attributes, enabling connection reuse without requiring complex attribute modifications. Connections are divided into distinct groups based on their assigned attributes, simplifying the management and repurposing process.

Inventive Principle:
Principle #1Segmentation

3Reliability

If the connection pool size is increased to reduce connection creation frequency, then connection availability improves, but the memory and resource consumption increase

Engineering Contradiction:
Improveconnection availabilityVSAvoidmemory resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The connection pool dynamically adjusts its behavior based on the maximum size constraint. When the pool reaches its configured maximum size, new connections are not created and existing connections are reused or removed. This dynamic management allows the system to maintain optimal connection availability within available memory resources, preventing unbounded resource consumption while ensuring sufficient connections are available.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system uses configurable parameters such as maximum pool size to control the balance between connection availability and resource consumption. By adjusting these parameters, the system can optimize performance for different workloads and resource constraints, allowing flexible control over the trade-off between having more connections available and consuming more memory resources.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3494474B1System and method for efficient repurposing of connections in a multi-tenant database environment
Publication Date: 2022.10.26 ORACLE INT CORP
  • EP3494474B1 patent drawingFigure 1
  • EP3494474B1 patent drawingFigure 2
  • EP3494474B1 patent drawingFigure 3

AI summary

Described herein are systems and methods for providing access to a database in a multi-tenant environment, including the use of a connection pool, with support for efficient repurposing of connections. In accordance with an embodiment, a software application can request that a connection be provided, to enable access to the database. In response to receiving the request, the connection pool can first determine if a particular connection with the exact desired attributes already exists within the pool, but is borrowed at the time of the request. If such a connection exists, then the connection pool can wait a period of time for that particular connection to become available, referred to herein as a double-wait. Subsequently, if the particular connection is not made available within the double-wait time period, the connection pool resumes its usual operation, for example by repurposing other connections.