-
Notifications
You must be signed in to change notification settings - Fork 271
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
control: Enforce timeouts on response stream #2587
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2587 +/- ##
==========================================
- Coverage 68.02% 68.00% -0.02%
==========================================
Files 329 330 +1
Lines 14904 14989 +85
==========================================
+ Hits 10139 10194 +55
- Misses 4765 4795 +30
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
bffcb6f
to
37bc6a1
Compare
When connecting to a control plane API, the API server can return an HTTP response long before it returns the first stream response. To bound this time, we now enforce timeouts so that failures may result in attempting to use an alternate controller instances. All controller response streams now use a generic gRPC middlware with initial, idle, and lifetime timeouts. When an initial timeout is encounterd, a DeadlineExceeded grpc status is synthesized. When the other timeouts are encountered, the stream terminates gracefully. These timeouts are configurable by the proxy injector. Timeouts are not enabled without configuration: * LINKERD2_PROXY_CONTROL_STREAM_INITIAL_TIMEOUT * LINKERD2_PROXY_CONTROL_STREAM_IDLE_TIMEOUT * LINKERD2_PROXY_CONTROL_STREAM_LIFETIME Each of these parameters is optional.
37bc6a1
to
2a3c234
Compare
linkerd/linkerd2-proxy#2587 adds configuration parameters that bound the lifetime and idle times of control plane streams. This change helps to mitigate imbalanced control plane replica usage and to generally prevent scenarios where a stream becomes "stuck," as has been observed when a control plane replica is unhealthy. This change adds helm values to control this behavior. Default values are provided.
linkerd/linkerd2-proxy#2587 adds configuration parameters that bound the lifetime and idle times of control plane streams. This change helps to mitigate imbalanced control plane replica usage and to generally prevent scenarios where a stream becomes "stuck," as has been observed when a control plane replica is unhealthy. This change adds helm values to control this behavior. Default values are provided.
When connecting to a control plane API, the API server can return an HTTP response long before it returns the first stream response. To bound this time, we now enforce timeouts so that failures may result in attempting to use an alternate controller instances. All controller response streams now use a generic gRPC middleware with initial, idle, and lifetime timeouts. When an initial timeout is encountered, a DeadlineExceeded grpc status is synthesized. When the other timeouts are encountered, the stream terminates gracefully. These timeouts are configurable by the proxy injector. Timeouts are not enabled without configuration: * LINKERD2_PROXY_CONTROL_STREAM_INITIAL_TIMEOUT * LINKERD2_PROXY_CONTROL_STREAM_IDLE_TIMEOUT * LINKERD2_PROXY_CONTROL_STREAM_LIFETIME Each of these parameters is optional. --- * build(deps): bump semver from 1.0.17 to 1.0.20 (linkerd/linkerd2-proxy#2576) * build(deps): bump memchr from 2.5.0 to 2.6.4 (linkerd/linkerd2-proxy#2577) * build(deps): bump arbitrary from 1.2.3 to 1.3.2 (linkerd/linkerd2-proxy#2578) * build(deps): bump data-encoding from 2.3.3 to 2.5.0 (linkerd/linkerd2-proxy#2579) * build(deps): bump tj-actions/changed-files from 40.2.3 to 41.0.1 (linkerd/linkerd2-proxy#2586) * build(deps): bump ahash from 0.8.5 to 0.8.6 (linkerd/linkerd2-proxy#2582) * build(deps): bump jemallocator from 0.5.0 to 0.5.4 (linkerd/linkerd2-proxy#2581) * build(deps): bump anyhow from 1.0.69 to 1.0.76 (linkerd/linkerd2-proxy#2583) * build(deps): bump symbolic-common from 12.6.0 to 12.8.0 (linkerd/linkerd2-proxy#2584) * build(deps): bump gimli from 0.28.0 to 0.28.1 (linkerd/linkerd2-proxy#2588) * build(deps): bump foreign-types-macros from 0.2.2 to 0.2.3 (linkerd/linkerd2-proxy#2590) * build(deps): bump symbolic-demangle from 12.6.0 to 12.8.0 (linkerd/linkerd2-proxy#2591) * control: Enforce timeouts on response stream (linkerd/linkerd2-proxy#2587) Signed-off-by: Oliver Gould <[email protected]>
When connecting to a control plane API, the API server can return an HTTP response long before it returns the first stream response. To bound this time, we now enforce timeouts so that failures may result in attempting to use an alternate controller instances. All controller response streams now use a generic gRPC middleware with initial, idle, and lifetime timeouts. When an initial timeout is encountered, a DeadlineExceeded grpc status is synthesized. When the other timeouts are encountered, the stream terminates gracefully. These timeouts are configurable by the proxy injector. Timeouts are not enabled without configuration: * LINKERD2_PROXY_CONTROL_STREAM_INITIAL_TIMEOUT * LINKERD2_PROXY_CONTROL_STREAM_IDLE_TIMEOUT * LINKERD2_PROXY_CONTROL_STREAM_LIFETIME Each of these parameters is optional. --- * build(deps): bump semver from 1.0.17 to 1.0.20 (linkerd/linkerd2-proxy#2576) * build(deps): bump memchr from 2.5.0 to 2.6.4 (linkerd/linkerd2-proxy#2577) * build(deps): bump arbitrary from 1.2.3 to 1.3.2 (linkerd/linkerd2-proxy#2578) * build(deps): bump data-encoding from 2.3.3 to 2.5.0 (linkerd/linkerd2-proxy#2579) * build(deps): bump tj-actions/changed-files from 40.2.3 to 41.0.1 (linkerd/linkerd2-proxy#2586) * build(deps): bump ahash from 0.8.5 to 0.8.6 (linkerd/linkerd2-proxy#2582) * build(deps): bump jemallocator from 0.5.0 to 0.5.4 (linkerd/linkerd2-proxy#2581) * build(deps): bump anyhow from 1.0.69 to 1.0.76 (linkerd/linkerd2-proxy#2583) * build(deps): bump symbolic-common from 12.6.0 to 12.8.0 (linkerd/linkerd2-proxy#2584) * build(deps): bump gimli from 0.28.0 to 0.28.1 (linkerd/linkerd2-proxy#2588) * build(deps): bump foreign-types-macros from 0.2.2 to 0.2.3 (linkerd/linkerd2-proxy#2590) * build(deps): bump symbolic-demangle from 12.6.0 to 12.8.0 (linkerd/linkerd2-proxy#2591) * control: Enforce timeouts on response stream (linkerd/linkerd2-proxy#2587) Signed-off-by: Oliver Gould <[email protected]>
linkerd/linkerd2-proxy#2587 adds configuration parameters that bound the lifetime and idle times of control plane streams. This change helps to mitigate imbalanced control plane replica usage and to generally prevent scenarios where a stream becomes "stuck," as has been observed when a control plane replica is unhealthy. This change adds helm values to control this behavior. Default values are provided.
When connecting to a control plane API, the API server can return an
HTTP response long before it returns the first stream response. To bound
this time, we now enforce timeouts so that failures may result in attempting
to use an alternate controller instances.
All controller response streams now use a generic gRPC middlware with
initial, idle, and lifetime timeouts. When an initial timeout is
encounterd, a DeadlineExceeded grpc status is synthesized. When the
other timeouts are encountered, the stream terminates gracefully.
These timeouts are configurable by the proxy injector. Timeouts are not
enabled without configuration:
Each of these parameters is optional.