-
Notifications
You must be signed in to change notification settings - Fork 259
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
[Choreo] Upstream connection handling support considering TCP and HTTP #3625
base: choreo
Are you sure you want to change the base?
Conversation
@@ -129,6 +129,11 @@ func CreateRoutesWithClusters(mgwSwagger model.MgwSwagger, upstreamCerts map[str | |||
if !strings.Contains(apiLevelEndpointProd.EndpointPrefix, xWso2EPClustersConfigNamePrefix) { | |||
cluster, address, err := processEndpoints(apiLevelClusterNameProd, apiLevelEndpointProd, | |||
upstreamCerts, timeout, apiLevelbasePath) | |||
// assigns specified values for TCP keep-alive and HTTP timeout considering specific organizations | |||
ok := slices.Contains(config.UpstreamConnectionConfEnabledOrgList, organizationID) | |||
if ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- support
@@ -189,6 +189,20 @@ retainKeys = ["self_validate_jwt", "issuer", "claim_mappings", "consumer_key_cla | |||
# Max interval for the Envoy's exponential retry back off algorithm | |||
maxInterval = "500ms" | |||
|
|||
# TCP configurations applicable with the upstream clusters | |||
[router.upstream.tCPConfigurations] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[router.upstream.tCPConfigurations] | |
[router.upstream.tcpConfigurations] |
keepaliveIntervalInMillis = 75000 | ||
|
||
# HTTP configurations applicable with the upstream clusters | ||
[router.upstream.hTTPConfigurations] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[router.upstream.hTTPConfigurations] | |
[router.upstream.httpConfigurations] |
# HTTP configurations applicable with the upstream clusters | ||
[router.upstream.hTTPConfigurations] | ||
# Idle timeout in milliseconds for connections | ||
idleTimeoutInMillis = 120000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too low for default. We have to set a value which is more than max response timeout (300s)
idleTimeoutInMillis = 120000 | |
idleTimeoutInMillis = 360000 |
# Maximum number of keep-alive probes to send without response before deciding the connection is dead | ||
keepaliveProbes = 9 | ||
# The number of milliseconds between keep-alive probes | ||
keepaliveIntervalInMillis = 75000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this too high? Wouldn't something like 30s be better?
keepaliveIntervalInMillis = 75000 | |
keepaliveIntervalInMillis = 30000 |
# The number of milliseconds a connection needs to be idle before keep-alive probes start being sent | ||
keepaliveTimeInMillis = 120000 | ||
# Maximum number of keep-alive probes to send without response before deciding the connection is dead | ||
keepaliveProbes = 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too high again?
keepaliveProbes = 9 | |
keepaliveProbes = 3 |
Purpose
$subject
Relates with: https://github.com/wso2-enterprise/choreo/issues/32453
Issues
Fixes #
Automation tests
Tested environments
Not Tested
Maintainers: Check before merge