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

[throttler-storage-redis] Improvement: consider SCRIPT LOAD with EVALSHA #52

Open
bplies-ATX opened this issue Oct 16, 2024 · 0 comments

Comments

@bplies-ATX
Copy link

The Redis script body could be improved by storing it Redis-side with SCRIPT LOAD (docs) so that it can be defined once and reused rather than re-submitted on each request. That should save a lot of network bytes over time as well as any script re-parsing.

Valkey has a nice writeup about this.

Whenever we call EVAL, we also include the script's source code with the request. Repeatedly calling EVAL to execute the same set of parameterized scripts, wastes both network bandwidth and also has some overheads in Valkey. Naturally, saving on network and compute resources is key, so, instead, Valkey provides a caching mechanism for scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant