ClusterInvalidator implementation based on Redis replacing the SQL one.
To use it edit the repository contrib and add:
<clusterInvalidatorClass>org.nuxeo.ecm.core.redis.contribs.RedisClusterInvalidator</clusterInvalidatorClass>
Invalidations are sent and received using the Redis pubsub messaging on the channel: nuxeo:inval:default:channel.
(default being the name of the repository)
There is a Redis HSET created for each Nuxeo node with the following key: nuxeo:inval:default:nodes:<nodeId>
$ redis-cli 127.0.0.1:6379> keys nuxeo:inval:default:nodes:* 1) "nuxeo:inval:default:nodes:16934" 2) "nuxeo:inval:default:nodes:11424" 127.0.0.1:6379> hgetall nuxeo:inval:default:nodes:16934 1) "started" 2) "2015-08-20T10:22:04.497" 3) "lastInvalSent" 4) "2015-08-20T12:29:10.443" 127.0.0.1:6379> ttl "nuxeo:inval:default:nodes:16934" (integer) 86328
The gain can be seen here (around x2) on heavy write operations:
https://benchmarks.nuxeo.com/misc/#16w08%20NXP-14923%20Redis%20vs%20DB%20invalidation
- depends on
-
NXP-14920 Make ClusterInvalidator (aka ClusterNodeHandler) pluggable
- Resolved
- is duplicated by
-
NXP-14021 Use redis in for distributing cache invalidation messages in cluster conf
- Resolved
- is related to
-
NXP-20873 Set correct startedDateTime while sending invalidation in RedisClusterInvalidator
- Resolved
- is required by
-
NXP-18537 Expose Redis based cluster invalidation using nuxeo.conf option
- Resolved