Optimizing DataPower Document Caches
msiebler 2700005RPQ Visits (3371)
Support often gets asked about optimizing the caches in DataPower, which is a very big topic. I am going to briefly discuss one frequent issue: using the document cache.
Document caches as you know are for XML or other non-compiled content. The following does not apply to the stylesheet caches, which work differently.
Suppose you have a configuration that has several domains and there are many files common between those domains. Is it better to duplicate the files or have a single copy?
There are 2 main resources that we can optimize for, and it might not be possible to optimize both: latency or memory.
For latency, having multiple local caches is best.
Latency: latency is minimized by having each service keep its own copy of the files; this avoids any extra hops. For most usecases this is best, unless one has hundreds of megabytes of duplicate data.
Memory: memory is minimized by having a single cached copy. There are a few ways to do this.
You can usually do a single cache by having a common domain which has a XML Firewall (FW) service that caches the documents. The FW has as a backend server, either a local HTTP server or a remote server. This setup will minimize the size of the document cache.
Generally though I do not recommend this approach. Because the document cache actually does not use transactional memory. It is kept in the ramdisk. So it uses the temporary space. Again, unless you are caching hundreds of megabytes of duplicate data, you normally would prefer to optimize for latency instead.