Skip to content

[NEW] EVALSHA readonly in Redis #8537

@prathik

Description

@prathik

The problem/use-case that the feature addresses

Lua operations that are readonly can run on replicas. However command info for evalsha and eval tell that they can be write commands. Redis clients use this information to route to replica or master. Evalsha is routed to masters since it's not a read only command. This primarily is for redis in cluster mode.

Description of the feature

Similar to GEORADIUS_RO, introduce EVAL_RO and EVALSHA_RO that are readonly versions of EVAL and EVALSHA.

Alternatives you've considered

Modifying client library to explicitly route calls to replica nodes.

Additional information

Have made a contribution on go-redis to explicitly read from replicas redis/go-redis#1581

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions