Skip to content

Switch from ZSETs to HASHes#58

Merged
ckcr4lyf merged 36 commits intomasterfrom
feature/redis-hexpire
Jun 20, 2025
Merged

Switch from ZSETs to HASHes#58
ckcr4lyf merged 36 commits intomasterfrom
feature/redis-hexpire

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.

@ckcr4lyf ckcr4lyf merged commit 310927e into master Jun 20, 2025
7 checks passed
@ckcr4lyf ckcr4lyf deleted the feature/redis-hexpire branch June 20, 2025 07:29
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