Skip to content

Commit 249d03a

Browse files
Add http client pool configurations.
1 parent d90665e commit 249d03a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

distribution/kernel/carbon-home/repository/resources/conf/default.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@
257257
"keystore.datasource": "jdbc/SHARED_DB",
258258
"http_client.connection.timeout_in_milli_seconds": "180000",
259259
"http_client.socket.timeout_in_milli_seconds": "300000",
260+
"http_client.pool.enabled": "false",
261+
"http_client.pool.max_total_connections": "{{$ref{transport.https.properties.maxThreads}//2}}",
262+
"http_client.pool.default_max_connections_per_route": "{{$ref{transport.https.properties.maxThreads}//2}}",
263+
"http_client.pool.add_keep_alive_strategy": "true",
260264
"tracing.opentelemetry.ldap.enabled": false,
261265
"tracing.opentelemetry.ldap.scope_name": "wso2isldap"
262266
}

distribution/kernel/carbon-home/repository/resources/conf/templates/repository/conf/carbon.xml.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,14 @@
927927
<Socket>
928928
<TimeoutInMilliSeconds>{{http_client.socket.timeout_in_milli_seconds}}</TimeoutInMilliSeconds>
929929
</Socket>
930+
{% if http_client.pool.enabled is defined %}
931+
<ConnectionPool>
932+
<Enabled>{{http_client.pool.enabled}}</Enabled>
933+
<MaxTotalConnections>{{http_client.pool.max_total_connections}}</MaxTotalConnections>
934+
<DefaultMaxConnectionsPerRoute>{{http_client.pool.default_max_connections_per_route}}</DefaultMaxConnectionsPerRoute>
935+
<AddKeepAliveStrategy>{{http_client.pool.add_keep_alive_strategy}}</AddKeepAliveStrategy>
936+
</ConnectionPool>
937+
{% endif %}
930938
</HttpClient>
931939

932940
<!-- Configure to instrument operations using OpenTelemetry manual instrumentation -->

0 commit comments

Comments
 (0)