layout: doc_page title: “Druid Redis Cache”

Druid Redis Cache

A cache implementation for Druid based on Redis.

Configuration

Below are the configuration options known to this module.

Note that just adding these properties does not enable the cache. You still need to add the druid.<nodetype>.cache.useCache and druid.<nodetype>.cache.populateCache properties for the nodes you want to enable the cache on as described in the cache configuration docs.

A possible configuration would be to keep the properties below in your common.runtime.properties file (present on all nodes) and then add druid.<nodetype>.cache.useCache and druid.<nodetype>.cache.populateCache in the runtime.properties file of the node types you want to enable caching on.

common.runtime.propertiesDescriptionDefaultRequired
druid.cache.hostRedis server hostNoneyes
druid.cache.portRedis server portNoneyes
druid.cache.expirationExpiration(in milliseconds) for cache entries24 * 3600 * 1000no
druid.cache.timeoutTimeout(in milliseconds) for get cache entries from Redis2000no
druid.cache.maxTotalConnectionsMax total connections to Redis8no
druid.cache.maxIdleConnectionsMax idle connections to Redis8no
druid.cache.minIdleConnectionsMin idle connections to Redis0no

Enabling

To enable the redis cache, include this module on the loadList and set druid.cache.type to redis in your properties.

Metrics

In addition to the normal cache metrics, the redis cache implementation also reports the following in both total and delta

MetricDescriptionNormal value
query/cache/redis/*/requestsCount of requests to redis cachewhatever request to redis will increase request count by 1