Microservice Cache Layer for Consistent High-Throughput Transactions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Microservices architectures face inefficiencies and performance issues due to redundant data access, increased latency, and data consistency challenges when multiple services need to access the same data to complete transactions, leading to degraded performance and increased operational costs.
Innovation Solution
A system utilizing cache nodes to store computations for microservices, allowing direct access without database connections, thereby reducing redundant data retrieval and improving transaction processing speed and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple microservices access the same data from the database directly, then data consistency can be maintained, but system latency increases and throughput decreases
Solution Approach 1:
The patent implements a cache-aside pattern where computation results are pre-stored in cache nodes before being requested by microservices. When a microservice needs data, it first checks the cache node, and if available, retrieves it immediately without querying the database again. This preliminary caching action resolves the contradiction by maintaining data consistency (through controlled cache updates) while dramatically improving throughput (by eliminating redundant database queries).
Solution Approach 2:
The patent introduces cache nodes as intermediary components between microservices and the database. These cache nodes store computation results and serve as a buffer layer, allowing multiple microservices to access data without directly querying the database simultaneously. This intermediary layer maintains consistency through coordinated cache invalidation while improving productivity by reducing database access latency.
2Measurement precision
If microservices query the database frequently to ensure data freshness, then data accuracy improves, but resource utilization increases and operational costs rise
Solution Approach 1:
The patent implements selective caching where only computation results that are frequently accessed or time-critical are stored in cache nodes. Not all data queries bypass the database - only those with cached results. This partial action approach maintains data accuracy for critical operations while reducing overall resource utilization by avoiding unnecessary cache management overhead for less critical data.
3Speed
If computation results are cached for fast access, then transaction speed improves, but data consistency challenges increase
Solution Approach 1:
The patent implements a cache invalidation mechanism that provides feedback when underlying data changes. When the database is updated, the system notifies relevant cache nodes to invalidate or update their cached computation results. This feedback loop maintains data consistency (by ensuring cache reflects current database state) while preserving transaction speed (by allowing cached data to be used until invalidation occurs).
Data Source
AI summary
A transaction system receives a transaction request for a database service. The transaction system retrieves, by a first microservice, a set of data from a data access layer of the database service in response to receiving the transaction request. The transaction system performs a set of computations based on the set of data retrieved from the data access layer. The transaction system stores the set of computations in one or more cache nodes of a data access service and accesses, by a second microservice, the set of computations, performed in response to retrieving the set of data by the first microservice, from the one or more cache nodes.


