Skip to content

Commit

Permalink
quic: upstream connections read 32 packets per loop (#32693)
Browse files Browse the repository at this point in the history
Commit Message: change the current behavior from reading up to 16 * number of in-flight requests to reading 32 packets per-connection.

Risk Level: low, HTTP/3 upstream is in Alpha now
Testing: existing tests pass
Docs Changes: N/A
Release Notes: Yes
Platform Specific Features: N/A
Runtime guard: envoy.reloadable_features.quic_upstream_reads_fixed_number_packets

Signed-off-by: Dan Zhang <[email protected]>
  • Loading branch information
danzh2010 authored Mar 5, 2024
1 parent 8003a96 commit 9e683d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ minor_behavior_changes:
Port migration is default turned off. QUIC client connections will no longer attempt to migrate to a new port when connections
is degrading. Can be manually turned on via
:ref:`port_migration <envoy_v3_api_field_config.core.v3.QuicProtocolOptions.num_timeouts_to_trigger_port_migration>`.
- area: QUIC
change: |
Make each upstream connection to read as many as 32 packets in each event loop. This feature can be disabled by setting
``envoy.reloadable_features.quic_upstream_reads_fixed_number_packets`` to false.
- area: aws
change: |
AWS region string is now retrieved from environment and profile consistently within aws_request_signer and
Expand Down
4 changes: 3 additions & 1 deletion source/common/quic/envoy_quic_client_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ class EnvoyQuicClientConnection : public quic::QuicConnection,
// TODO(mattklein123): Emit a stat for this.
}
size_t numPacketsExpectedPerEventLoop() const override {
if (delegate_.has_value()) {
if (!Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.quic_upstream_reads_fixed_number_packets") &&
delegate_.has_value()) {
return delegate_->numPacketsExpectedPerEventLoop();
}
return DEFAULT_PACKETS_TO_READ_PER_CONNECTION;
Expand Down
1 change: 1 addition & 0 deletions source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ RUNTIME_GUARD(envoy_reloadable_features_quic_fix_filter_manager_uaf);
// Ignore the automated "remove this flag" issue: we should keep this for 1 year. Confirm with
// @danzh2010 or @RyanTheOptimist before removing.
RUNTIME_GUARD(envoy_reloadable_features_quic_send_server_preferred_address_to_all_clients);
RUNTIME_GUARD(envoy_reloadable_features_quic_upstream_reads_fixed_number_packets);
RUNTIME_GUARD(envoy_reloadable_features_sanitize_te);
RUNTIME_GUARD(envoy_reloadable_features_send_header_raw_value);
RUNTIME_GUARD(envoy_reloadable_features_send_local_reply_when_no_buffer_and_upstream_request);
Expand Down

0 comments on commit 9e683d2

Please sign in to comment.