Discussion:
[redis-db] Redis lua duplication of read calls
Astro
2018-11-27 06:07:02 UTC
Permalink
When a block of operations is executed on redis in lua script, all
operations, including GET, EXISTS are being executed on slave as well.

Normally, only SET, DELETE, INCT ops are streamed from master to slave.
However, in lua script, all operations including read are streamed to slave.


With multiple slaves at, this looks duplication of calls on slaves.

How to avoid these read calls on slave?.


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.
Xingbo Wang
2018-11-27 07:02:27 UTC
Permalink
Hi Astro:

Is this what you want?
https://redis.io/commands/eval#replicating-commands-instead-of-scripts

Thanks,
Shawn
Post by Astro
When a block of operations is executed on redis in lua script, all
operations, including GET, EXISTS are being executed on slave as well.
Normally, only SET, DELETE, INCT ops are streamed from master to slave.
However, in lua script, all operations including read are streamed to slave.
With multiple slaves at, this looks duplication of calls on slaves.
How to avoid these read calls on slave?.
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.
--
Best Regards,

Xingbo
--
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.
Loading...