oslabs-beta / GraphQL-Gate

A GraphQL rate limiting library with query complexity analysisfor Node.js
http://graphqlgate.io
MIT License
57 stars 2 forks source link

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

Open evanmcneely opened 2 years ago

evanmcneely commented 2 years ago

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 commented 2 years ago

see Lua scripting

shalarewicz commented 2 years ago

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