Skip to content

Commit

Permalink
Merge pull request #4766 from osandamaleesha/master
Browse files Browse the repository at this point in the history
Add server configurations guidelines to WSO2 IS documentation
  • Loading branch information
himeshsiriwardana authored Sep 25, 2024
2 parents 41193ff + ae70768 commit 31daca9
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
48 changes: 48 additions & 0 deletions en/identity-server/next/docs/includes/http-client-connections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Fine tune HTTP Client Connections

To fine-tune connections initiated by WSO2 Identity Server to external services, you may add the following configurations to the `deployment.toml` file located in the `<IS_HOME>/repository/conf/` directory

<table>
<thead>
<tr class="header">
<th>Property</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>http_client.read_timeout</td>
<td>
<p>The maximum time (in milliseconds) the server will wait for a response from the external service.</p>
</td>
</tr>
<tr class="even">
<td>http_client.request_timeout</td>
<td><p>The maximum time (in milliseconds) the server will wait to obtain a connection from the connection pool.</p></td>
</tr>
<tr class="odd">
<td>http_client.connection_timeout</td>
<td><p>The maximum time (in milliseconds) the server will wait to establish a connection to the external service.</p></td>
</tr>
<tr class="even">
<td>http_client.connection_pool_size</td>
<td><p>The size of the HTTP connection pool used for outbound requests.</p></td>
</tr>
<tr class="odd">
<td>http_client.retry_count</td>
<td><p>Number of retry attempts made in case of a failure. Refer to the <a href="{{base_path}}/guides/customize/actions/understanding-actions/#time-out-and-retry">list of http codes</a> that trigger retries.</p></td>
</tr>
</tbody>
</table>

Sample configuration is as follows:

```toml
[actions]
http_client.read_timeout = 6000
http_client.request_timeout = 3000
http_client.connection_timeout = 3000
http_client.connection_pool_size = 10
http_client.retry_count = 1

```
1 change: 1 addition & 0 deletions en/identity-server/next/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -887,3 +887,4 @@ not_in_nav: |
/includes/db-basic-config.md
/includes/db-config-table.md
/includes/rollback-pending.md
/includes/http-client-connections.md
4 changes: 4 additions & 0 deletions en/includes/guides/customize/actions/setting-up-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ The following are some of the troubleshooting steps that you may take to resolve
1. Ensure that your external service is up and running and that there are no connectivity issues.

2. Confirm that the request and response payloads conform to the expected formats as defined by the REST API contract.

{% if product_name == "WSO2 Identity Server" %}
{% include "../../../../identity-server/next/docs/includes/http-client-connections.md" %}
{% endif %}
7 changes: 5 additions & 2 deletions en/includes/guides/customize/actions/understanding-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ The following diagram illustrates the sequence of these steps:
<td>requestId</td>
<td><p>A unique correlation identifier that associates the request received by {{product_name}}.</p></td>
</tr>
</tr>
<tr class="odd">
<td>actionType</td>
<td><p>Indicates the execution point within the {{product_name}} runtime where your external service is called. Refer to <a href="#explore-action-types">Explore Action Types</a> for a list of supported trigger points.</p></td>
Expand Down Expand Up @@ -163,7 +162,6 @@ If the error response includes an acceptable payload, it is treated as an error
<td>502</td>
<td><p>Bad Gateway.</p></td>
</tr>
</tr>
<tr class="odd">
<td>503</td>
<td><p>Service Unavailable.</p></td>
Expand All @@ -175,6 +173,11 @@ If the error response includes an acceptable payload, it is treated as an error
</tbody>
</table>

{% if product_name == "WSO2 Identity Server" %}
!!! note
Refer to [Fine tune HTTP Client Connections]({{base_path}}/guides/customize/actions/setting-up-actions/#configuring-http-client-connections) for details on adjusting timeouts, connection pooling, and retries.
{%endif %}

Requests will not be retried if the external service responds with HTTP status codes 200 (OK), 400 (Bad Request), 401 (Unauthorized), or any other codes not listed above as retry scenarios.

### Troubleshooting
Expand Down

0 comments on commit 31daca9

Please sign in to comment.