Caching for the Presto Server
The
Presto Server caches artifact metadata, for internal purposes, and optionally caches mashable and mashup responses to improve performance. By default, caches are stored in local memory. See
Artifact Caching and
Response Caching for details.
The Integrated
MashZone Server also uses local memory for internal caches. See
Tune Memory/Caching for the Integrated
MashZone
Server for information on caching for the Integrated
MashZone Server.
All
Presto caches plus the
Presto Analytics In-Memory Stores, can be distributed when
Presto is deployed in clusters. See
Distributed Caching for
Presto
Clusters for an overview of distributed caching for
Presto.
Caches for the the Integrated MashZone Server do not support distributed caching and must remain in local memory.
Artifact Caching
Artifact caching caches metadata for mashables, mashups and apps when they are run in Presto Hub, the AppDepot, the Presto Mobile apps or in any external destination such as SharePoint, portals or web pages. For example, the first time an app is viewed, the specification for that app is retrieved from the Presto Repository and cached. Subsequent requests use the cached specification.
Because updates to artifacts are typically infrequent, this cache is long-lived. It is not persisted to disk. Cache entries are flushed only when an artifact is updated or when the server hosting the cache is restarted. No additional configuration is required to enable local artifact caching for Presto.
Response Caching
Response caching caches the responses from mashables and mashups when they are run. This is a short lived cache that caches response data based on the unique signature of each request to mashables or mashups.
Configuration for response caching gives you fine grained control for which mashables and mashups use response caching and the expiration periods for their cache entries. See
Configuring Mashable/Mashup Response Caching for instructions.
Distributed Caching for Presto Clusters
When Presto is deployed in clusters, both artifact caching and the Presto Analytics In-Memory Stores must be distributed to maintain cache integrity. Response caching, however, can be left in local memory for each Presto Server or it can be distributed.
In many environments, local caching provides both good performance and acceptable cache integrity for response caching. Local caching is "eventually consistent", but can result in visible differences as cached responses are not guaranteed to be identical for different cluster members. For environments that cannot tolerate any loss of cache integrity, distributed response caching is recommended.
Note: | Distributed caching is only available if you purchase and deploy BigMemory Servers. |
Caches for the the Integrated MashZone Server do not support distributed caching and must remain in local memory.
You use BigMemory Servers to handle distributed caching for Presto. When this is combined with Presto clusters, the high-level architecture looks like this:
With BigMemory Servers, data for both the Presto Analytics In-Memory Stores and most Presto caches can use the total off-heap memory configured for the cluster plus any heap and off-heap memory configured for the Presto local host.
The BigMemory Servers manage consistency and memory across the cluster. They also support failover, with mirror servers, for high availability and many other advanced capabilities that may be useful for enterprise production systems.