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

Handle low memory conditions #22

Open
rillian opened this issue Jan 24, 2023 · 0 comments
Open

Handle low memory conditions #22

rillian opened this issue Jan 24, 2023 · 0 comments

Comments

@rillian
Copy link
Contributor

rillian commented Jan 24, 2023

The addrAggregator builds a hash map from wallet ids to associated anonymised IP addresses. We can calculate approximately how much storage this requires for normal traffic, but that doesn't account for traffic spikes. A service should handle that as gracefully as possible, even if under a direct denial-of-service attack.

Two suggestions here:

  • Replace the map with something like a bloom filter to bound resource usage.
  • Have a background task periodically check process memory use, or the number of elements tracked, and implement some policy (flush? delete data?) when a threshold is reached.
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