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

API response time assessment and reduction #3197

Closed
AetherUnbound opened this issue Oct 16, 2023 · 6 comments
Closed

API response time assessment and reduction #3197

AetherUnbound opened this issue Oct 16, 2023 · 6 comments
Assignees
Labels
🧭 project: thread An issue used to track a project and its progress 🧱 stack: api Related to the Django API 🧱 stack: infra Related to the Terraform config and other infrastructure

Comments

@AetherUnbound
Copy link
Collaborator

Description

This project thread is intended to capture the work related to investigating and reducing our APIs average response time. Recent elevated response times have impeded our ability to run image data refreshes, so we'd like to understand the response times more and reduce the effect the data refresh has on our API's average response time.

Issues

Project board for managing this work is here: https://github.com/orgs/WordPress/projects/144

@AetherUnbound AetherUnbound added 🧭 project: thread An issue used to track a project and its progress 🧱 stack: api Related to the Django API 🧱 stack: infra Related to the Terraform config and other infrastructure labels Oct 16, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Oct 16, 2023
@AetherUnbound AetherUnbound moved this from Not Started to In Progress in Openverse Project Tracker Oct 16, 2023
@openverse-bot
Copy link
Collaborator

Hi @AetherUnbound, this project has not received an update comment in 14 days. Please leave an update comment as soon as you can. See the documentation on project updates for more information.

@AetherUnbound
Copy link
Collaborator Author

@dhruvkb and @obulat, with the assistance of @stacimc and @sarayourfriend were able to deploy the index reduction changes outlined in the deployment plan and reduce the size of the indices by 30%! This is a tremendous accomplishment, but it unfortunately did not seem to affect the API response time as we had hoped.

We are continuing to work on increased monitoring for Elasticsearch, and other tickets related to improving the data refresh process so we can unpause it once more.

@openverse-bot
Copy link
Collaborator

Hi @AetherUnbound, this project has not received an update comment in 14 days. Please leave an update comment as soon as you can. See the documentation on project updates for more information.

@AetherUnbound
Copy link
Collaborator Author

We recently deployed three major changes which we believe have helped address the issues:

This has had a tremendous effect on the /related/ endpoints and reduced the periodicity of these spikes!
image
image

While we still have a few issue left in the project view, work on other projects can resume now that the response times have stabilized.

We're also in the process of restarting the data refreshes which have been paused while we address this. Audio has completed already, and we will start image later this week.

@AetherUnbound AetherUnbound moved this from 🚧 In Progress to 🚢 Shipped in Openverse Project Tracker Nov 21, 2023
@AetherUnbound
Copy link
Collaborator Author

After a few more days of monitoring, the difference in Elasticsearch (and thus API) response time is evident!
image
image

We believe this to be a product of the 3 mentioned changes above. We've moved this project into "Shipped" for now until we get some feedback around the simple query string changes (#3327) and deploy the reduced data node JVM heap change (https://github.com/WordPress/openverse-infrastructure/issues/677, currently waiting on the data refresh). We've been able to run data refreshes successfully without additional strain on the API, I think we can safely say we're in the clear here! 🥳

@sarayourfriend
Copy link
Collaborator

Closing this issue as we've resolved the API response time problems.

@AetherUnbound AetherUnbound moved this from 🚢 Shipped to ✅ Success in Openverse Project Tracker Dec 6, 2023
@AetherUnbound AetherUnbound self-assigned this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧭 project: thread An issue used to track a project and its progress 🧱 stack: api Related to the Django API 🧱 stack: infra Related to the Terraform config and other infrastructure
Projects
Archived in project
Development

No branches or pull requests

3 participants