Discussion:
[redis-db] Reads not sent to slave
Astro
2018-10-26 12:23:53 UTC
Permalink
I am using redis-py-cluster(latest version) with redis cluster version
4.0.11.

Using this redis-py-cluster doc
<https://redis-py-cluster.readthedocs.io/en/master/readonly-mode.html>.

Sample redis.conf

slave-read-only yes
slave-serve-stale-data yes


Below is the python code that connects to the cluster:


startup_nodes= [a list of cluster nodes goes here inclusing all masters and
slaves]
rc = StrictRedisCluster(startup_nodes=startup_nodes, readonly_mode=True)
rc = rc.pipeline()
---
some redis GET call code here
---
rc.execute()


However, all get calls are still being executed on masters only when
checked using MONITOR.


Please suggest.


Thanks!
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Itamar Haber
2018-10-26 13:58:38 UTC
Permalink
Hello Astro,

After a cursory review, your code appears correct, and redis-py-cluster
implementation appears as if it should work as documented.

That said, as you're experiencing this issue, you may want to open an issue
in redis-py-cluster's repository.

Cheers,
Post by Astro
I am using redis-py-cluster(latest version) with redis cluster version
4.0.11.
Using this redis-py-cluster doc
<https://redis-py-cluster.readthedocs.io/en/master/readonly-mode.html>.
Sample redis.conf
slave-read-only yes
slave-serve-stale-data yes
startup_nodes= [a list of cluster nodes goes here inclusing all masters
and slaves]
rc = StrictRedisCluster(startup_nodes=startup_nodes, readonly_mode=True)
rc = rc.pipeline()
---
some redis GET call code here
---
rc.execute()
However, all get calls are still being executed on masters only when
checked using MONITOR.
Please suggest.
Thanks!
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely

Phone: +972.54.567.9692

[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...