A containerized redis master/slave configuration with sentinels for use in Rancher for use in a development environment.
This configuration will spin up the following:
- 3 redis nodes (with 1 data container each)
- 3 redis sentinels
- The master/slave array is using shared local mapped storage at /app/nas/redis (need to expand to use stack name)
- Data is retained during upgrades and scaling up/down on the services.
Nothing special is needed to set this up. However, you can modify the time frame for writing db file in the redis.conf file.
The defaults are:
- write every 10 min if more than 10 changes detected.
- write every 5 min if more than 1000 changes detected
- write every 1 min if more than 10k changes detected.
We have brought these down to 30sec to 1 min for testing/verifying.