http2: adding upstream idle timeout ping (#16887)

This also fixes a bug with existing keepalive, where if the interval were larger than the idle timeout, it would send new pings and never time out.

Risk Level: medium (data plane change, changes existing ping logic)
Testing: unit tests
Docs Changes: n/a
Release Notes:
Fixes #16313

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

Mirrored from https://github.com/envoyproxy/envoy @ 79343be05c9528462b51af10b49d5fffe6e173e5
pull/624/head
data-plane-api(Azure Pipelines) 4 years ago
parent 46b635cf4b
commit 3a4538880e
  1. 14
      envoy/config/core/v3/protocol.proto
  2. 14
      envoy/config/core/v4alpha/protocol.proto

@ -244,10 +244,8 @@ message Http1ProtocolOptions {
message KeepaliveSettings {
// Send HTTP/2 PING frames at this period, in order to test that the connection is still alive.
google.protobuf.Duration interval = 1 [(validate.rules).duration = {
required: true
gte {nanos: 1000000}
}];
// If this is zero, interval PINGs will not be sent.
google.protobuf.Duration interval = 1 [(validate.rules).duration = {gte {nanos: 1000000}}];
// How long to wait for a response to a keepalive PING. If a response is not received within this
// time period, the connection will be aborted.
@ -260,6 +258,14 @@ message KeepaliveSettings {
// A value of zero means there will be no jitter.
// The default value is 15%.
type.v3.Percent interval_jitter = 3;
// If the connection has been idle for this duration, send a HTTP/2 ping ahead
// of new stream creation, to quickly detect dead connections.
// If this is zero, this type of PING will not be sent.
// If an interval ping is outstanding, a second ping will not be sent as the
// interval ping will determine if the connection is dead.
google.protobuf.Duration connection_idle_interval = 4
[(validate.rules).duration = {gte {nanos: 1000000}}];
}
// [#next-free-field: 16]

@ -252,10 +252,8 @@ message KeepaliveSettings {
"envoy.config.core.v3.KeepaliveSettings";
// Send HTTP/2 PING frames at this period, in order to test that the connection is still alive.
google.protobuf.Duration interval = 1 [(validate.rules).duration = {
required: true
gte {nanos: 1000000}
}];
// If this is zero, interval PINGs will not be sent.
google.protobuf.Duration interval = 1 [(validate.rules).duration = {gte {nanos: 1000000}}];
// How long to wait for a response to a keepalive PING. If a response is not received within this
// time period, the connection will be aborted.
@ -268,6 +266,14 @@ message KeepaliveSettings {
// A value of zero means there will be no jitter.
// The default value is 15%.
type.v3.Percent interval_jitter = 3;
// If the connection has been idle for this duration, send a HTTP/2 ping ahead
// of new stream creation, to quickly detect dead connections.
// If this is zero, this type of PING will not be sent.
// If an interval ping is outstanding, a second ping will not be sent as the
// interval ping will determine if the connection is dead.
google.protobuf.Duration connection_idle_interval = 4
[(validate.rules).duration = {gte {nanos: 1000000}}];
}
// [#next-free-field: 16]

Loading…
Cancel
Save