blob: 5aa84ae99093d0e8cda999e955b9fd1b64fbe0de [file] [log] [blame]
This configuration helps you configure components using Redis. This so far only includes optional rate limiting component.
Consult this link:https://github.com/apache/james-project/blob/fabfdf4874da3aebb04e6fe4a7277322a395536a/server/mailet/rate-limiter-redis/redis.properties[example]
to get some examples and hints.
== Redis Configuration
.redis.properties content
|===
| Property name | explanation
| redisURL
| the Redis URI pointing to Redis server. Compulsory. The value must fit redis.topology
Reference: https://github.com/redis/lettuce/wiki/Redis-URI-and-connection-details
| redis.topology
| Redis server topology. Defaults to standalone. Possible values: standalone, cluster, master-replica, sentinel
| 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.sentinelPassword
| Redis sentinel password. If not specified, the redis driver will not set password for sentinel.
| 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 link:https://redis.io/docs/latest/operate/oss_and_stack/management/config-file/[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.