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

General improvements #24

Open
leandromoreira opened this issue Feb 3, 2019 · 1 comment
Open

General improvements #24

leandromoreira opened this issue Feb 3, 2019 · 1 comment

Comments

@leandromoreira
Copy link
Owner

leandromoreira commented Feb 3, 2019

Shorten the key_prefix

Let's say we want to count 200K users or tokens, it implies the double of the counters (past and current minute) multiply that by 18 (key_prefix length), maybe we can use something like nrm.

  • (4e5 * 18)/1024^2 6MB vs 1MB (4e5 * 3)/1024^2

Uncouple ngx from measure function

It can be useful outside of nginx, we can change the function signature to also receive the current_time in seconds.

Generate docs

http://stevedonovan.github.io/ldoc/

@leandromoreira
Copy link
Owner Author

Improvement 2 is not possible due ngx.null and redis-resty openresty/lua-resty-redis#65

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