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

Locally cache device ID lookups #22

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

Locally cache device ID lookups #22

kegsay opened this issue Jan 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kegsay
Copy link
Member

kegsay commented Jan 24, 2023

If a user with a bad access token comes along and hits the API, we see some logs like this:

11:07:53 WRN failed to get user ID from device ID error="/whoami returned HTTP 401" device_id=20d...

This isn't great as it is a 1:1 relationship between requests to us and requests to the upstream HS, making it a spam vector. Let's cache the lookup in a LRU cache for a bit. It also spams logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant