API Gateway Stateful Database Connection Pooling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In on-demand computing environments, maintaining state information for customer applications is challenging due to the dynamic provisioning of computing resources, leading to lost application state between invocations and the need for frequent database reconnects, which is costly and time-consuming.
Innovation Solution
An API gateway service that manages application programming interfaces (APIs) by providing a RESTful interface to backend services, facilitating connection pooling, caching, and credential translation to maintain state information and improve access efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If computing resources are dynamically provisioned and released in on-demand environments, then resource utilization and scalability are improved, but application state information is lost between invocations
Solution Approach 1:
The patent introduces an API gateway service as an intermediary between the dynamically provisioned computing resources and the database. This gateway maintains connection state information persistently, allowing stateless compute environments to access stateful database resources without losing connection context. The gateway acts as a mediator that preserves state information across invocations of customer functions.
2Reliability
If database connections are reestablished for each function invocation, then connection state consistency is maintained, but connection overhead and time consumption increase
Solution Approach 1:
The API gateway service establishes and maintains database connections in advance, creating a pool of ready-to-use connections before they are needed. Customer functions can directly utilize these pre-established connections without performing connection handshakes or authentication rituals each time, significantly reducing connection establishment time while maintaining state consistency through the gateway's connection management.
3Productivity
If connection pooling is implemented within the application, then connection reuse efficiency is improved, but compatibility with dynamically provisioned computing resources is reduced
Solution Approach 1:
The patent extracts the connection pooling functionality from the customer application and relocates it to the API gateway service. This separation allows the compute environment to remain stateless and dynamically provisionable, while the connection pooling state is maintained externally in the gateway service. The application simply requests connections from the gateway without managing connection pools itself, achieving both connection reuse efficiency and dynamic environment compatibility.
Data Source
AI summary
An application programming interface gateway service generates an application programming interface that, in various examples, allows client applications to access database functionality without maintaining active database connections, managing database credentials, or providing SQL code. The application programming interface maintains state information between invocations that allows for improved database performance. The state information may include SQL statements and subroutines, compiled SQL code, database credentials, active database connections, and connection pools. When invoked by a client application, the application programming interface may select an active database connection from a connection pool based at least in part on the activity history of each connection in the connection pool so that the expected cache performance of the database may be improved. Access to the application programming interface may be controlled via fine-grained access controls independent of the credentials used to access the database.


