Distributed James Server — redis.properties
This configuration helps you configure components using Redis. This so far only includes optional rate limiting component.
Consult this example to get some examples and hints.
Redis Configuration
Property name | explanation |
---|---|
redisURL |
the Redis URI pointing to Redis server. Compulsory. |
redis.topology |
Redis server topology. Defaults to standalone. Possible values: standalone, cluster, master-replica |
redis.readFrom |
The property to determine how Lettuce routes read operations to Redis server with topologies other than standalone. Defaults to master. Possible values: master, masterPreferred, replica, replicaPreferred, any Reference: https://github.com/redis/lettuce/wiki/ReadFrom-Settings |
redis.ioThreads |
IO threads to be using for the underlying Netty networking resources. If unspecified driver defaults applies. |
redis.workerThreads |
Worker threads to be using for the underlying driver. If unspecified driver defaults applies. |
Enabling Multithreading in Redis
Redis 6 and later versions support multithreading, but by default, Redis operates as a single-threaded process.
On a virtual machine with multiple CPU cores, you can enhance Redis performance by enabling multithreading. This can significantly improve I/O operations, particularly for workloads with high concurrency or large data volumes.
See THREADED I/O section.
Example if you have a 4 cores CPU, you can enable the following lines in the redis.conf
file:
io-threads 3 io-threads-do-reads yes
However, if your machine has only 1 CPU core or your Redis usage is not intensive, you will not benefit from this.