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

feat(outbound): Add per-route stream timeout policies #3088

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

olix0r
Copy link
Member

@olix0r olix0r commented Jul 23, 2024

This change adds a new timeout configuration to the outbound HTTP and gRPC policies that sets request extensions to configure timeout behavior in the endpoint stack. This ensures that timeouts manifest as endpoint-level errors (i.e. visible to endpoint-level circuit breakers) instead of as a route-level cancellation.

Several timeouts are implemented:

  1. A request timeout, which is the maximum time a full request-response stream can remain in the proxy.
  2. A response headers timeout that limits the amount of time after the request has been fully sent in which response headers must be fully received. This will be used to implement retry timeouts.
  3. A response timeout, which limits the amount of time after the request has been fully sent in which a response may be in flight.
  4. An idle timeout that limits the time a request-response stream may be sit in the proxy without any DATA frame activity.

NOTE: As this timeout is enforced in the endpoint stack, it is currently possible for requests to remain in the balancer queue until a failfast timeout is tripped. The configured timeouts only apply to requests that have been dequeued and dispatched to an endpoint.

NOTE: A followup API change is required to support configuring all timeouts via the API.

@olix0r olix0r force-pushed the ver/route-timeout branch 4 times, most recently from a1f68b3 to 9a4a19f Compare July 24, 2024 15:17
Base automatically changed from ver/no-route-timeout to main July 24, 2024 16:31
@olix0r olix0r force-pushed the ver/route-timeout branch from 9a4a19f to 432b712 Compare July 24, 2024 16:35
@olix0r olix0r marked this pull request as ready for review July 24, 2024 16:37
@olix0r olix0r requested a review from a team as a code owner July 24, 2024 16:37
@olix0r olix0r force-pushed the ver/route-timeout branch 2 times, most recently from 2a62c91 to b75dbb8 Compare July 24, 2024 16:59
This change adds a new timeout configuration to the outbound HTTP and gRPC
policies that sets request extensions to configure timeout behavior in the
endpoint stack. This ensures that timeouts manifest as endpoint-level errors
(i.e. visible to endpoint-level circuit breakers) instead of as a route-level
cancellation.

Several timeouts are implemented:

1. A request timeout, which is the maximum time a full request-response stream
   can remain in the proxy.
2. A response headers timeout that limits the amount of time after the request
   has been fully sent in which response headers must be fully received. This
   will be used to implement retry timeouts.
3. A response timeout, which limits the amount of time after the request has
   been fully sent in which a response may be in flight.
4. An idle timeout that limits the time a request-response stream may be sit in
   the proxy without any DATA frame activity.

NOTE: As this timeout is enforced in the endpoint stack, it is currently
possible for requests to remain in the balancer queue until a failfast timeout
is tripped. The configured timeouts only apply to requests that have been
dequeued and dispatched to an endpoint.

NOTE: A followup API change is required to support configuring all timeouts via
the API.
@olix0r olix0r force-pushed the ver/route-timeout branch from b75dbb8 to ef6586b Compare July 24, 2024 17:01
@olix0r olix0r enabled auto-merge (squash) July 24, 2024 17:03
@olix0r olix0r merged commit 0071ce8 into main Jul 24, 2024
16 checks passed
@olix0r olix0r deleted the ver/route-timeout branch July 24, 2024 17:07
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.

1 participant