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

Switch from ZSETs to HASHes #58

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Switch from ZSETs to HASHes #58

wants to merge 36 commits into from

Conversation

ckcr4lyf
Copy link
Owner

ZSET needs to waste resources to keys the keys (IP, port) organized in lexographical order. This is a waste for us, since for a tracker we don't need it to be sorted.

Additionally, we only needed a ZSET w/ score component so we can keep track of how old the elements are (via unix timestamp). However, Redis HASHes now have HEXPIRE on fields , which means they can be wiped automatically.

This also means we don't need a GC-style cleanup job on the DB.

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

Successfully merging this pull request may close these issues.

1 participant