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

Adapter sends too many update requests to API server #1935

Closed
Tharsanan1 opened this issue Jan 8, 2024 · 1 comment · Fixed by #1948
Closed

Adapter sends too many update requests to API server #1935

Tharsanan1 opened this issue Jan 8, 2024 · 1 comment · Fixed by #1948
Assignees
Milestone

Comments

@Tharsanan1
Copy link
Contributor

Tharsanan1 commented Jan 8, 2024

We are sending a lot of upate cr request to the API server because we are trying to update the reference of the child every time it reconciles. Most of the reconciles are happening with a state that adapter has not received all of its children. So we are sending a lot of update request to api server. While we have a lot of APIs preloaded in the cluster, api server becomes congested. So we have two options

  1. Move the update logic to the last line of resolveApiRef method, only do a update reference if all the children are found and based on the apiState variable(It would have all the children). The problem with this approach is it will cause dangling CR problem in this scenario: I create api and bunch of resources but forgot to apply one of its child hence API is not resolved in the adapter side so no owner reference to any of the child of this API. Now I decides to delete the API instead of adding that missing child cr. Now we are left with dangling resources.

  2. Move the update onwer reference logic to watch methods of each child object and do the update there.

I am going ahead with the option 2 as it does not have the dangling cr problem.

@Tharsanan1 Tharsanan1 self-assigned this Jan 8, 2024
@Tharsanan1 Tharsanan1 moved this from Backlog to In-Progress in APK Development Jan 8, 2024
@Tharsanan1 Tharsanan1 changed the title UpdateCR method IO wait throttles the overall performance Adapter sends too many update requests to API server Jan 12, 2024
@Tharsanan1
Copy link
Contributor Author

While doing the development, I realized that we will be endup with dangling CR problem if we only go with option 1. So I have used a hybrid approach of option 1 and option 2 to solve this issue. PR: #1948

@github-project-automation github-project-automation bot moved this from In-Progress to ✅ Done/Done in APK Development Jan 18, 2024
@CrowleyRajapakse CrowleyRajapakse added this to the 1.1.0-alpha milestone Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done/Done
Development

Successfully merging a pull request may close this issue.

2 participants