www.fgks.org   »   [go: up one dir, main page]

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

Add per-key caching to get_availability #8732

Merged
merged 2 commits into from Jan 29, 2024

Conversation

cdrini
Copy link
Collaborator
@cdrini cdrini commented Jan 19, 2024

We're having some performance issues associated with high traffic to the availability endpoint. Add caching to our /service/availability calls to avoid causing too much traffic.

Technical

  • DRY methods that call get_availability
  • Add more types to availability data structures
  • Add support for memcache's get/set_multi
  • Decrease get_availability timeout to 10s instead of 30s

Testing

  • Loading a search result page twice results in no new call to availability endpoint
  • Loading /widget endpoint works

Screenshot

Stakeholders

@cdrini cdrini force-pushed the perf/cache-author-pages branch 4 times, most recently from 6692ce0 to 960d580 Compare January 19, 2024 09:07
@cdrini cdrini marked this pull request as ready for review January 19, 2024 09:10
Also:
- DRY methods that call get_availability
- Add more types to availability data structures
- Add support for memcache's get/set_multi
- Decrease get_availability timeout to 10s instead of 30s
@cdrini cdrini added the Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle. label Jan 19, 2024
@cdrini
Copy link
Collaborator Author
cdrini commented Jan 19, 2024

Patch deployed to monitor perf impacts

@scottbarnes scottbarnes self-assigned this Jan 22, 2024
Copy link
Collaborator
@scottbarnes scottbarnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@scottbarnes scottbarnes merged commit 7927be4 into internetarchive:master Jan 29, 2024
3 checks passed
@cdrini cdrini deleted the perf/cache-author-pages branch January 29, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants