Layer7 API Management

  • 1.  CA API Gateway and cache management capabilities

    Broadcom Employee
    Posted Feb 09, 2016 05:20 AM

    Dear community,

     

    Today I have some quesitons about how the Gateway manage its cache feature.

     

    My motivation is simple : I already have some services which use cache functionnality in production, and I am developping more ones. I know gateway is caching data into RAM memory, using allocated space for the gateway java process.

     

    The main point is : how Gateway handle the case when no more space is available ? How the solution isolate / protect the main gateway controller process from being affected by cache fulfillment ?Is there an automatic flush which is implemented on older cache entries for all caches / a complete cache id flush ? Or gateway we simply refuses to cache more entries ?

    Finally is it there a way I can be natively alerted when such case occur ?

     

    Next set of questions is about cache monitoring of the solution.

    I am aware that the solution does not provide a way to know excatly 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 ?

     

    And to conclude what are CA advises for a clean, safe and Industrial way of using the native cache management funtionnalities of your solution?

     

    Thank you for your feedback



  • 2.  Re: CA API Gateway and cache management capabilities
    Best Answer

    Broadcom Employee
    Posted Aug 28, 2016 03:56 PM

    Nicholas,

     

    In response to your questions in this post.

    1. How 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 isolate / protect 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. Or gateway we simply refuses to cache more entries Finally is it there a way I can be natively alerted when such case occur ?
    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 are CA advises 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.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support