-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Added max_requests_per_connection for downstream connection. #14936
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
Changes from all commits
3906abe
ff52d2d
5fa29e3
163c635
3fecf7e
68301da
236b9dc
e46bd37
6744578
944e461
69b3990
aed45e3
50fbcfb
a34504e
cab8b98
a1b6593
306227e
f9f204d
0a46515
8ed8e32
c74bfd2
97988ae
7607d85
a5ec9d8
c70c421
86ff39e
2418fd0
310a0cc
9926092
bfa9cac
5f9360e
f53cf49
6d80d9f
67d99a1
bdc5c59
83dd809
5306bb1
318096c
f6989ee
13d1358
a1cd357
8a97141
ee2bfd9
ebf6747
b34e753
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -713,8 +713,9 @@ ClusterInfoImpl::ClusterInfoImpl( | |
| extensionProtocolOptionsTyped<HttpProtocolOptionsConfigImpl>( | ||
| "envoy.extensions.upstreams.http.v3.HttpProtocolOptions"), | ||
| factory_context.messageValidationVisitor())), | ||
| max_requests_per_connection_( | ||
| PROTOBUF_GET_WRAPPED_OR_DEFAULT(config, max_requests_per_connection, 0)), | ||
| max_requests_per_connection_(PROTOBUF_GET_WRAPPED_OR_DEFAULT( | ||
| http_protocol_options_->common_http_protocol_options_, max_requests_per_connection, | ||
| config.max_requests_per_connection().value())), | ||
| max_response_headers_count_(PROTOBUF_GET_WRAPPED_OR_DEFAULT( | ||
| http_protocol_options_->common_http_protocol_options_, max_headers_count, | ||
| runtime_.snapshot().getInteger(Http::MaxResponseHeadersCountOverrideKey, | ||
|
|
@@ -767,6 +768,12 @@ ClusterInfoImpl::ClusterInfoImpl( | |
| : absl::nullopt), | ||
| factory_context_( | ||
| std::make_unique<FactoryContextImpl>(*stats_scope_, runtime, factory_context)) { | ||
| if (config.has_max_requests_per_connection() && | ||
| http_protocol_options_->common_http_protocol_options_.has_max_requests_per_connection()) { | ||
| throw EnvoyException("Only one of max_requests_per_connection from Cluster or " | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a test for this case
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
| "HttpProtocolOptions can be specified"); | ||
| } | ||
|
|
||
| switch (config.lb_policy()) { | ||
| case envoy::config::cluster::v3::Cluster::ROUND_ROBIN: | ||
| lb_type_ = LoadBalancerType::RoundRobin; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.