Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pipeline with multi-exec to set multiple keys at once #51

Open
boesing opened this issue Oct 13, 2022 · 1 comment
Open

Use pipeline with multi-exec to set multiple keys at once #51

boesing opened this issue Oct 13, 2022 · 1 comment
Labels
Enhancement hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com Help Wanted

Comments

@boesing
Copy link
Member

boesing commented Oct 13, 2022

Feature Request

Q A
New Feature yes
BC Break no

Summary

As of now, RedisCluster uses setex for every item and therefore does not persist all the keys at once. This might be inefficient when it comes to a huge amount of keys.

I am following redis/redis#5867 for quite a while and there was some frequent update:
redis/redis#5867 (comment)

So the user @oranagra states that using a pipeline along with multi-exec might be as performant as using MSETEX.

This issue is meant to be an idea of how to further optimize StorageInterface#setItems for redis cluster.

@boesing boesing added Enhancement Help Wanted hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com labels Oct 13, 2022
@boesing
Copy link
Member Author

boesing commented Jun 21, 2024

I've had a quick glance but it seems that using multi across cluster does not work as expected.
Got an exception:

RedisClusterException: Error processing EXEC across the cluster

Ref: phpredis/phpredis#868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com Help Wanted
Projects
None yet
Development

No branches or pull requests

1 participant