[Docs]: Add RTD documentation for ServiceConfig properties and WebClientConfiguration... 55/139955/6
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 20 Jan 2025 12:37:55 +0000 (12:37 +0000)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Wed, 22 Jan 2025 15:28:07 +0000 (15:28 +0000)
- Added detailed RTD documentation for the ServiceConfig class properties, including connection pooling, timeout settings, and memory management.
- Documented the context and usage of WebClientConfiguration, explaining its role in configuring HTTP client behavior for services like Policy Executor and DMI.
- Included example configurations and best practices for tuning HTTP client performance.
- Improved clarity and accessibility of ServiceConfig-related configuration for future developers and administrators.

Issue-ID: CPS-2565
Change-Id: I84e612b2f56293c453884e341a516f55b2bb6b81
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
docs/deployment.rst

index 940bc50..f248c15 100644 (file)
@@ -293,35 +293,74 @@ Any spring supported property can be configured by providing in ``config.additio
 
 Additional CPS-NCMP Customizations
 ==================================
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.dmiPluginUserName                  | User name used by cps-core to authenticate themselves for using ncmp-dmi-plugin service.                | ``dmiuser``                   |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.dmiPluginUserPassword              | Internal password used by cps-core to connect to ncmp-dmi-plugin service.                               | Not defined                   |
-|                                           |                                                                                                         |                               |
-|                                           | If not defined, the password is generated when deploying the application.                               |                               |
-|                                           |                                                                                                         |                               |
-|                                           | See also :ref:`cps_common_credentials_retrieval`.                                                       |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.ncmp.timers                        | Specifies the delay in milliseconds in which the module sync watch dog will wake again after finishing. | ``5000``                      |
-| .advised-modules-sync.sleep-time-ms       |                                                                                                         |                               |
-|                                           |                                                                                                         |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.ncmp.timers                        | Specifies the delay in milliseconds in which the data sync watch dog will wake again after finishing.   | ``30000``                     |
-| .cm-handle-data-sync.sleep-time-ms        |                                                                                                         |                               |
-|                                           |                                                                                                         |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.ncmp.dmi.httpclient     | Specifies the maximum time in seconds, to wait for establishing a connection for the HTTP Client.       | ``30``                        |
-| .connectionTimeoutInSeconds               |                                                                                                         |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.ncmp.dmi.httpclient     | Specifies the maximum number of connections allowed per route in the HTTP client.                       | ``50``                        |
-| .maximumConnectionsPerRoute               |                                                                                                         |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.ncmp.dmi.httpclient     | Specifies the maximum total number of connections that can be held by the HTTP client.                  | ``100``                       |
-| .maximumConnectionsTotal                  |                                                                                                         |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.ncmp.dmi.httpclient     | Specifies the duration in seconds for the threshold, after which idle connections will be evicted       | ``5``                         |
-| .idleConnectionEvictionThresholdInSeconds | from the connection pool by the HTTP client.                                                            |                               |
-+-------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| Property                                        | Description                                                                                             | Default Value |
++=================================================+=========================================================================================================+===============+
+| config.dmiPluginUserName                        | User name used by cps-core to authenticate themselves for using ncmp-dmi-plugin service.                | ``dmiuser``   |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.dmiPluginUserPassword                    | Internal password used by cps-core to connect to ncmp-dmi-plugin service.                               | Not defined   |
+|                                                 |                                                                                                         |               |
+|                                                 | If not defined, the password is generated when deploying the application.                               |               |
+|                                                 |                                                                                                         |               |
+|                                                 | See also :ref:`cps_common_credentials_retrieval`.                                                       |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.ncmp.timers                              | Specifies the delay in milliseconds in which the module sync watch dog will wake again after finishing. | ``5000``      |
+| .advised-modules-sync.sleep-time-ms             |                                                                                                         |               |
+|                                                 |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.ncmp.timers                              | Specifies the delay in milliseconds in which the data sync watch dog will wake again after finishing.   | ``30000``     |
+| .cm-handle-data-sync.sleep-time-ms              |                                                                                                         |               |
+|                                                 |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Maximum size (in MB) of the in-memory buffer for HTTP response data.                                    | ``16``        |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .maximumInMemorySizeInMegabytes                 |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Maximum number of simultaneous connections allowed in the connection pool.                              | ``100``       |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .maximumConnectionsTotal                        |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Maximum number of pending requests when the connection pool is full.                                    | ``50``        |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .pendingAcquireMaxCount                         |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Specifies the maximum time in seconds, to wait for establishing a connection for the HTTP Client.       | ``30``        |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .connectionTimeoutInSeconds                     |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Timeout (in seconds) for reading data from the server after the connection is established.              | ``30``        |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .readTimeoutInSeconds                           |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Timeout (in seconds) for writing data to the server.                                                    | ``30``        |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .writeTimeoutInSeconds                          |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+| config.additional.ncmp                          | Total timeout (in seconds) for receiving a complete response, including all processing stages.          | ``60``        |
+| .[app]                                          |                                                                                                         |               |
+| .httpclient                                     |                                                                                                         |               |
+| .[services]                                     |                                                                                                         |               |
+| .responseTimeoutInSeconds                       |                                                                                                         |               |
++-------------------------------------------------+---------------------------------------------------------------------------------------------------------+---------------+
+
+.. note::
+
+    - [app] : can be 'policy-executor' or 'dmi'.
+    - [services] 'all-services' for 'policy-executor'.
+    - [services] 'data-services' and 'model-services' for 'dmi'.
 
 CPS-Core Docker Installation
 ============================