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

Move the repopulation of the redis cache into a different service #22

Open
vidia opened this issue Feb 3, 2017 · 0 comments
Open

Move the repopulation of the redis cache into a different service #22

vidia opened this issue Feb 3, 2017 · 0 comments

Comments

@vidia
Copy link
Member

vidia commented Feb 3, 2017

In order for us to better version our API in the future, we will need to run multiple versions of this codebase at the same time. Right now, if we decide to do that, it would query the WashAlert site once per minute per version, which is not good.

I think a better way would be to have a cache like we have, then have a service that ONLY queries WashAlert every minute to populate Redis.

Then the API will request from Redis if it exists. If the key is not in redis (Which should not happen, but we should handle this case) then request WashAlert directly.

Then we can make multiple versions of the PAI, but only ever need one copy of the refresh server. We can consider lumping the statistic logging functions into this as well, which might be the cleanest way for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants