Cache location in API Gateway
search cancel

Cache location in API Gateway

book

Article ID: 145247

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

I would like to know where the content of the cache used in assertions like Store to Cache are located. We are implementing a cache-based solution that will store lots of tokens and it would be very useful to know if this uses heap, JVM memory, internal machine memory, etc... so we can size properly.
 

Environment

Release : 9.4, 10.x, 11.x

Component : CA API Gateway

Cause

The article answers the cache location in CA API Gateway.

Resolution

The cached content is located in RAM and/or disk space.  Following is more detailed information. 

 

https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=756429

1. How does the Gateway handle the case when no more space is available?

 

The Store to Cache assertion always succeeds. Problems creating or updating an underlying cache will not cause the assertion to fail but are reported in the system audit log.
All of the following error conditions will be logged as warnings:
Unable to store cached value: disk full/quota exceeded/filesystem out of inodes
Unable to store cached value: cache directory not found/no write permission
Unable to store cached value: I/O error when writing

 

2. How the solution isolates /protects the main gateway controller process from being affected by cache fulfillment?
Cache assertion uses a global cache architecture, so the main gateway controller process is not isolated from cache fulfillment. However, not all cache entries are store in RAM. There is configurable RAM/Disk threshold (default threshold is 8096 B), and a configurable maximum cache entries setting (default is 10,000 entries), so with default settings the maximum amount of RAM used by each cache is relatively low. If you need to cache many large entries then your concern may be disk space.
The disk threshold can be set with the "messageCache.diskThreshold" cluster property.

 

3. Is there an automatic flush which is implemented on older cache entries for all caches / a complete cache id flush?
There is a configurable maximum age setting for cache entries (default is 5 minutes).
Every 15 minutes every cache which has been created is inspected and all expired entries are removed. In addition, expired entries are removed from a cache when a new entry is stored in it.

 

4. Is there a way I can be natively alerted of any problems associated with the cache ?
Policy can be written to examine audits and the details can be emailed to yourself with the Send Email Alert assertion.

 

5. The customer is aware that the solution does not provide a way to know exactly which entities are cached. Nevertheless is there a manner for easily monitoring the evolution of the cache part of ram consumption from the global gtw process ?
There is no way of monitoring cache RAM consumption.

 

6. What does Broadcom suggest for a clean, safe and Industrial way of using the native cache management functionalities of your solution?
Currently there are no best practices to offer. Customers are advised to tune based on their individual needs.
We have a Remote Cache assertion from Tactical that works with Memcached. Depending on customer needs we could suggest it as an alternative to our standard cache assertions.