GraphQL-Gate icon indicating copy to clipboard operation
GraphQL-Gate copied to clipboard

Experiment with redis functions to do cache side computations of ratelimiting computations

Open evanmcneely opened this issue 3 years ago • 2 comments

Our token bucket algo is currently getting data from the redis cache and doing computations server side. 'Redis Functions' allow the redis store to carry out computations on the redis's side, which possibly decreases the number of requests made to speed up the algorithm. Try this out to see if it actually has any performance differences.

evanmcneely avatar Jun 02 '22 17:06 evanmcneely

see Lua scripting

evanmcneely avatar Jul 17 '22 23:07 evanmcneely

Consider either SortedSet or List for use in SlidingWindowLog. Will most likely require a lua script to be purely server side. Hashes may be useful for remaining limiters and may not require a lua script

shalarewicz avatar Jul 20 '22 01:07 shalarewicz