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

Webhook load causing api latencies #494

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smahendarkar
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@smahendarkar smahendarkar requested a review from a team as a code owner April 4, 2024 02:41
@@ -96,4 +96,6 @@ request:

Mutating webhooks can modify resources in frequent succession. If you have 5 mutating webhooks and deploy 50 resources etcd will store all versions of each resource until compaction runs—every 5 minutes—to remove old versions of modified resources. In this scenario when etcd removes superseded resources there will be 200 resource version removed from etcd and depending on the size of the resources may use considerable space on the etcd host until defragmentation runs every 15 minutes.

Webhook endpoint under heavy load may take longer to respond to incoming requests. This will add latencies in the response times of the cluster. This can be influenced by factors such as the number of concurrent requests being handled, the resources available to the endpoint, and any rate limiting or throttling mechanisms in place. Review and optimize the performance of the webhook endpoint code to minimize response times. This may involve identifying and addressing bottlenecks in the code, optimizing database queries, and caching frequently accessed data.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a paragraph that suggest CX to monitor the webhook latency.
And we should also suggest CX to use objectSelector (https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector) whenever possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added to this based on above suggestion. Please further review

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

Successfully merging this pull request may close these issues.

2 participants