Skip to content

Commit

Permalink
outbound: add request timeout fields (#243)
Browse files Browse the repository at this point in the history
This branch adds fields to the `OutboundPolicies` API messages for
configuring request timeouts. The `HttpRoute.Rule` and `GrpcRoute.Rule`
messages now contain a `requestTimeout` field, which contains a
`Duration` for a request timeout for that rule. In addition, the
`RouteBackend` messages also contain a `requestTimeout` field, which
configures a duration for requests dispatched to that specific backend.
All new fields have comments describing their intended semantics.

These fields are primarily intended to support the new timeout fields
added to the HTTPRoute CRD in GEP-1742 (see linkerd/linkerd2#10969). The
HTTPRoute timeout configuration are an additional field on the `rule`
fields in a route that contains optional `request` and `backendRequest`
timeouts. This means that a single request timeout and backend request
timeout is set for all backends on an individual route rule. 

The proxy API additions in this PR are somewhat more flexible than the
current HTTPRoute CRD, as each `RouteBackend` has its *own* field for
the `backendRequest` timeout. This means that in theory, independent
`backendRequest` timeout values could be configured for each individual
backend. HTTPRoute doesn't currently support this, but it felt like a
good idea to add this flexibility in the proxy API regardless, to
support future use cases.
  • Loading branch information
hawkw authored Jun 1, 2023
1 parent fc3acf3 commit 58c5242
Show file tree
Hide file tree
Showing 3 changed files with 487 additions and 352 deletions.
Loading

0 comments on commit 58c5242

Please sign in to comment.