Shard Director for Database Connection Pooling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modern web-oriented software applications face scalability challenges due to large volumes of data, which can be addressed by sharding data into multiple smaller databases, but existing methods lack efficient access mechanisms, leading to performance issues and resource inefficiencies.
Innovation Solution
The system provides direct access to a sharded database using a shard director and connection pool, allowing clients to specify shard keys for efficient connection reuse and utilizing a shard topology layer to cache key ranges, enabling fast access and resource optimization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If data is sharded into multiple smaller databases to handle large volumes, then scalability is improved, but access efficiency and system performance deteriorate due to lack of efficient access mechanisms
Solution Approach 1:
The patent introduces a shard director as an intermediary component that sits between the client application and the sharded database. This shard director receives connection requests, determines the appropriate shard based on shard keys, and establishes connections to specific shards. This intermediary layer enables efficient access to sharded databases by centralizing the shard selection logic and maintaining connection pools for each shard, thereby resolving the contradiction between scalability through sharding and access efficiency.
2Productivity
If connection pools are used to manage database connections, then resource reuse is improved, but connection management complexity increases
Solution Approach 1:
The patent segments the connection pool into separate connection pools for each shard. Instead of managing a single monolithic connection pool, the system creates independent connection pools for each shard, allowing connections to be reused within each shard's pool. This segmentation simplifies connection management by isolating connection state per shard and enables the shard director to efficiently route requests to the appropriate shard's connection pool, thereby improving resource reuse while managing complexity through modular organization.
3Speed
If shard topology layers cache key ranges to locations, then access speed is improved, but system complexity and memory requirements increase
Solution Approach 1:
The patent implements preliminary action by caching shard key ranges to their corresponding shard locations in the shard topology layer before actual data access occurs. This topology information is built and maintained in advance, allowing subsequent connection requests to use fast key path access through the cached topology data. The shard topology layer proactively organizes and stores mapping information between shard keys and shard locations, enabling rapid lookup during operations without requiring complex real-time discovery mechanisms.
Data Source
AI summary
In accordance with an embodiment, described herein are systems and methods for providing direct access to a sharded database. A shard director provides access by software client applications to database shards. A connection pool (e.g., a Universal Connection Pool, UCP) and database driver (e.g., a Java Database Connectivity, JDBC, component) can be configured to allow a client application to provide a shard key, either during connection checkout or at a later time; recognize shard keys specified by the client application; and enable connection by the client application to a particular shard or chunk. The approach enables efficient re-use of connection resources, and faster access to appropriate shards.


