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

gep: add GEP-3388 HTTPRoute Retry Budget #3488

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ericdbishop
Copy link

What type of PR is this?

/kind gep

What this PR does / why we need it:

To seek consensus on the ideal configuration of a "retry budget" in HTTPRoute, allowing application developers to dynamically limit the rate of client-side retries to their service based on a percentage of the active request volume.

Extends #1731

Which issue(s) this PR fixes:

Fixes #3388

Does this PR introduce a user-facing change?:

TBD. GEP is marked "Provisional" while implementation details are sorted out, and goals are reviewed.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/gep PRs related to Gateway Enhancement Proposal(GEP) labels Dec 8, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ericdbishop
Once this PR has been reviewed and has the lgtm label, please assign danwinship for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 8, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 8, 2024
@k8s-ci-robot k8s-ci-robot requested a review from robscott December 8, 2024 19:26
@k8s-ci-robot
Copy link
Contributor

Welcome @ericdbishop!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 8, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @ericdbishop. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mikemorris
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 9, 2024
@robscott robscott added this to the v1.3.0 milestone Dec 10, 2024
@ericdbishop
Copy link
Author

For the API implementation, I've been comparing approaches between introducing retry budgets as a part of HTTPRoute, or implementation via policy attachments. Retry budgets are the default retry policy for Linkerd, and are highly recommended by Envoy when configuring cluster circuit breaker thresholds, so simplicity will be a priority here.

HTTPRoute retry stanza

  • The UX for retry budgets we'd like to match is applying the policy to a service as a whole, as opposed to individual routes. If you have multiple HTTPRoute objects pointing to the same service, you would have to configure the retry budget in multiple places.

  • While Linkerd implements a retry budget alongside individual route configuration within the ServiceProfile CRD, the retry budget is configured once across all routes in a single set of fields within the CRD. In practice, this works similarly to the Envoy CircuitBreaker threshold.

  • If we wanted retry budgets to be configured on a per-route basis (as opposed to at the service level), it would require a change to be made in Envoy Route. I believe similar changes would need to be made for Linkerd.

Policy Attachment

  • May be more confusing from a UX perspective to configure retries in two different places (HTTPRoute for static retries, versus a policy attachment for a dynamic retry threshold).

  • Ideally, we could define a single policy, targeting a service, that would dynamically configure a retry threshold based on the percentage of active requests across all routes destined for that service's backends.

  • This may allow for a dynamic threshold of retries to be configured at the service level, alongside a static max number of retries on the route level. Application developers would then be allowed more granular control of which requests should be retried. For example, maybe an application developer will not want to perform retries on a specific route where requests are not idempotent, and can disable retries for that route.


Please let me know if my assessment of the functionality between different data plane implementations, and my understanding of how we could use policy attachments, are correct here. I would lean towards the policy attachment implementation, as it seems like the more straightforward approach, both for data plane implementations, as well as for the UX we offer to application developers. Would appreciate your thoughts here, @kflynn @mikemorris!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/gep PRs related to Gateway Enhancement Proposal(GEP) ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retry Budgets in HTTPRouteRetry
4 participants