Customizable Caching Strategy for REST API Latency and Memory Footprint
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing caching strategies for REST API endpoints result in increased cache memory footprint with service subscription, leading to latency issues in authentication and authorization processes.
Innovation Solution
A customized caching strategy is implemented that optimizes data retrieval based on usage patterns, using a Secure End Node (SEN) to intercept client requests, perform authentication and authorization checks, and dynamically cache metadata with a time-to-live parameter to manage memory footprint.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If metadata is cached to improve authentication and authorization performance, then latency is reduced, but cache memory footprint increases linearly with service subscription
Solution Approach 1:
The patent applies local quality by differentiating caching strategies based on service subscription types. Different services receive different caching treatments - some services have their metadata cached while others do not, based on their specific requirements. This selective approach allows the system to optimize for latency only where necessary, rather than uniformly caching all metadata which would increase overall memory footprint linearly with subscription count.
Solution Approach 2:
The patent segments the caching strategy by service subscription, dividing the user base into different categories with different caching requirements. By segmenting the metadata caching approach according to service types and subscription levels, the system can maintain low latency for critical services while avoiding unnecessary memory consumption for services that don't require aggressive caching, thus breaking the linear relationship between subscription count and cache footprint.
2Productivity
If all metadata is cached to ensure fast authentication and authorization, then service response time is improved, but system resource consumption increases
Solution Approach 1:
The patent implements local quality by applying caching selectively to specific services and metadata based on their authentication and authorization requirements. Rather than universally caching all metadata which would consume excessive system resources, the system identifies which services benefit most from cached metadata and applies caching only to those cases, thereby maintaining fast response times for critical operations while minimizing overall resource consumption.
Solution Approach 2:
The patent applies partial action by caching only the portion of metadata that is necessary for maintaining acceptable service response times. Instead of caching excessive or complete metadata sets for all services, the system determines the minimum necessary caching required for each service type and implements only that level of caching, optimizing the balance between response time and resource consumption.
Data Source
AI summary
A method, apparatus, and computer program product are provided to implement a customized caching strategy which optimizes the implementation based on usage patterns. In the context of a method a client request for a service is intercepted and an authentication check is performed for the client request based on cached data. In an instance in which the authentication check succeeds, the method performs an authorization check for the client request based on the cached data. In an instance in which the authorization check succeeds, the method forwards the client request for the service to the service. A corresponding apparatus and a computer program product are also provided.


