Database Query Routing via Multiplexer and Shared Memory
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database query performance is hindered by the computational expense of handling large volumes of data, particularly in read and write operations, which can lead to increased response times and reduced efficiency in database systems used for online transactions and services.
Innovation Solution
Implementing a system that routes read queries to replica databases instead of primary databases, using a multiplexer to determine query validity through invalidation queries and shared memory for configuration and version management, thereby distributing query load and reducing the computational burden on primary databases.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all database queries are routed to the primary database, then data consistency and reliability are maintained, but response time increases and system performance deteriorates due to computational overload
Solution Approach 1:
The patent segments database queries into two categories: read queries and write queries. Read queries are routed to replica databases while write queries are routed to the primary database. This segmentation allows the system to distribute read load across multiple replicas, reducing the burden on the primary database and decreasing query response time while maintaining data consistency through periodic synchronization.
Solution Approach 2:
The patent introduces a multiplexer as an intermediary component that sits between clients and databases. The multiplexer receives client requests, determines whether they are read or write queries, and routes them to appropriate databases (primary or replicas). This intermediary enables intelligent query routing without requiring changes to client applications, thereby improving response time while preserving data consistency.
2Productivity
If read queries are routed to replica databases, then query response time decreases and system throughput improves, but data consistency may be compromised if replicas are not properly synchronized
Solution Approach 1:
The patent implements preliminary synchronization actions where replica databases are continuously updated with data changes from the primary database before read queries are executed against them. The system maintains version numbers and uses invalidation queries to ensure replicas have the latest data, allowing read queries to be safely routed to replicas without compromising data consistency.
Solution Approach 2:
The patent implements feedback mechanisms through invalidation queries that check whether replica data is current before serving read requests. The system monitors data changes and provides feedback to the routing logic, ensuring that read queries are only routed to replicas when data consistency is guaranteed, thus maintaining reliability while improving throughput.
3Productivity
If a multiplexer with invalidation queries is implemented, then query routing accuracy improves and primary database load decreases, but system complexity increases
Solution Approach 1:
The patent designs the multiplexer to perform multiple functions: receiving client requests, determining query type (read/write), routing to appropriate databases, and managing replica synchronization. By consolidating these functions in a single component, the system reduces overall complexity compared to having separate components for each function, while still achieving improved primary database efficiency.
Data Source
AI summary
Systems and methods for improving database system performance are described. In one embodiment, a database system includes a database application cluster including at least one read-write node and a plurality of read nodes, a shared memory, and a multiplexer coupled to the database application cluster and shared memory. The multiplexer is configured to receive a request from a client computing system which includes a database query. Based on a lookup in the shared memory, the multiplexer determines that the database query can be routed to one of the plurality of read nodes. In response, the database query is routed to one of the read nodes for execution.


