You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know whether we can use other forms of distribution mode apart from the 3 modes listed in the doc. The requirement is, we need to redirect the Redis reads to the slave, only in case if we infer/anticipate load/issue in the master. The read requests have to be redirected to the slave well in advance the master gets overloaded. This redirection is required to save the Redis instance that can be loaded due to various reasons.
This mode will be useful not only to redirect the reads from master to slave, but it can also be from one slave to other slaves due to the higher load in the former.
-Sairam.
The text was updated successfully, but these errors were encountered:
Redis sentinel support is planned for the 0.6.0 release (but not merged yet), but that is currently only designed to identify the redis master to connect to it. I'd assume connecting to the replicas is feasible, but haven't looked into how to implement it. It's something I'd planned to look into after 0.6.0 is out
Pointing twemproxy at haproxy can be used as a workaround, assuming that haproxy is listening on port 16389, the redis master is typically on port 6389, and the redis replica is typically on port 6390, an example haproxy config would be:
(by marking 6389 as the backup, haproxy will prefer 6390)
Note that this will make haproxy connect to redis and send requests every 5 seconds to determine the availability of the instances
TysonAndre
changed the title
Custom key Distribution mode to choose the backend server.
Custom key Distribution mode to prefer redis replica/slave as the backend server over the master
Aug 29, 2021
Hi,
I would like to know whether we can use other forms of distribution mode apart from the 3 modes listed in the doc. The requirement is, we need to redirect the Redis reads to the slave, only in case if we infer/anticipate load/issue in the master. The read requests have to be redirected to the slave well in advance the master gets overloaded. This redirection is required to save the Redis instance that can be loaded due to various reasons.
This mode will be useful not only to redirect the reads from master to slave, but it can also be from one slave to other slaves due to the higher load in the former.
-Sairam.
The text was updated successfully, but these errors were encountered: