Skip to content

Commit

Permalink
runtime: make grpc client cache enabled by default(envoyproxy#19253)
Browse files Browse the repository at this point in the history
Risk Level: low
Testing: change testing to verify new behavior
Docs Changes: n/a
Release Notes: added
Platform Specific Features: n/a

Signed-off-by: chaoqin-li1123 <[email protected]>
Signed-off-by: Josh Perry <[email protected]>
  • Loading branch information
chaoqin-li1123 authored and Josh Perry committed Feb 13, 2022
1 parent ccc4346 commit 33cd39a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Minor Behavior Changes
----------------------
*Changes that may cause incompatibilities for some users, but should not for most*

* grpc: flip runtime guard ``envoy.reloadable_features.enable_grpc_async_client_cache`` to be default enabled. async grpc client created through getOrCreateRawAsyncClient will be cached by default.
* http: now the max concurrent streams of http2 connection can not only be adjusted down according to the SETTINGS frame but also can be adjusted up, of course, it can not exceed the configured upper bounds. This fix is guarded by ``envoy.reloadable_features.http2_allow_capacity_increase_by_settings``.

Bug Fixes
Expand Down
5 changes: 1 addition & 4 deletions source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.correct_scheme_and_xfp",
"envoy.reloadable_features.correctly_validate_alpn",
"envoy.reloadable_features.disable_tls_inspector_injection",
"envoy.reloadable_features.enable_grpc_async_client_cache",
"envoy.reloadable_features.fix_added_trailers",
"envoy.reloadable_features.grpc_bridge_stats_disabled",
"envoy.reloadable_features.handle_stream_reset_during_hcm_encoding",
Expand Down Expand Up @@ -111,10 +112,6 @@ constexpr const char* disabled_runtime_features[] = {
"envoy.reloadable_features.allow_multiple_dns_addresses",
// Sentinel and test flag.
"envoy.reloadable_features.test_feature_false",
// When the runtime is flipped to true, use shared cache in getOrCreateRawAsyncClient method if
// CacheOption is CacheWhenRuntimeEnabled.
// Caller that use AlwaysCache option will always cache, unaffected by this runtime.
"envoy.reloadable_features.enable_grpc_async_client_cache",
// TODO(dmitri-d) reset to true to enable unified mux by default
"envoy.reloadable_features.unified_mux",
// TODO(birenroy): flip to true in a future PR to enable by default
Expand Down
6 changes: 3 additions & 3 deletions test/common/grpc/async_client_manager_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ TEST_F(AsyncClientManagerImplTest, EnvoyGrpcOk) {
}

TEST_F(AsyncClientManagerImplTest, DisableRawAsyncClientCache) {
TestScopedRuntime scoped_runtime;
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.enable_grpc_async_client_cache", "false"}});
envoy::config::core::v3::GrpcService grpc_service;
grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

Expand All @@ -146,9 +149,6 @@ TEST_F(AsyncClientManagerImplTest, DisableRawAsyncClientCache) {
}

TEST_F(AsyncClientManagerImplTest, EnableRawAsyncClientCache) {
TestScopedRuntime scoped_runtime;
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.enable_grpc_async_client_cache", "true"}});
envoy::config::core::v3::GrpcService grpc_service;
grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

Expand Down

0 comments on commit 33cd39a

Please sign in to comment.