You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow more than one http rest & grpc listeners (#3749)
### 🛠 Summary
CVS-170537
- added support for comma separated bind address list via CLI/C-API
- changed localhost to 127.0.0.1 in docs where requests pip package is
used because request localhost can introduce initial 2s delay on windows
systems due to ipv6 connection try before actual ipv4 connection is
estabilished
- updated security considerations doc
- updated performance optimization doc
Copy file name to clipboardExpand all lines: docs/parameters.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,8 @@ Configuration options for the server are defined only via command-line options a
36
36
|---|---|---|
37
37
|`port`|`integer`| Number of the port used by gRPC sever. |
38
38
|`rest_port`|`integer`| Number of the port used by HTTP server (if not provided or set to 0, HTTP server will not be launched). |
39
-
|`grpc_bind_address`|`string`|Network interface address or a hostname, to which gRPC server will bind to. Default: all interfaces: 0.0.0.0 |
40
-
|`rest_bind_address`|`string`|Network interface address or a hostname, to which REST server will bind to. Default: all interfaces: 0.0.0.0 |
39
+
|`grpc_bind_address`|`string`|Comma separated list of ipv4/ipv6 network interface addresses or hostnames, to which gRPC server will bind to. Default: all interfaces: 0.0.0.0 |
40
+
|`rest_bind_address`|`string`|Comma separated list of ipv4/ipv6 network interface addresses or hostnames, to which REST server will bind to. Default: all interfaces: 0.0.0.0 |
41
41
|`grpc_workers`|`integer`| Number of the gRPC server instances (must be from 1 to CPU core count). Default value is 1 and it's optimal for most use cases. Consider setting higher value while expecting heavy load. |
42
42
|`rest_workers`|`integer`| Number of HTTP server threads. Effective when `rest_port` > 0. Default value is set based on the number of CPUs. |
43
43
|`file_system_poll_wait_seconds`|`integer`| Time interval between config and model versions changes detection in seconds. Default value is 1. Zero value disables changes monitoring. |
Copy file name to clipboardExpand all lines: docs/performance_tuning.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,23 @@ To save power, the OS can decrease the CPU frequency and increase a volatility o
144
144
$ cpupower frequency-set --min 3.1GHz
145
145
```
146
146
147
+
## Network Configuration for Optimal Performance
148
+
149
+
By default, OVMS endpoints are bound to all ipv4 addresses. On same systems, which route localhost name to ipv6 address, it might cause extra time on the client side to switch to ipv4. It can effectively results with extra 1-2s latency.
150
+
It can be overcome by switching the API URL to `http://127.0.0.1` on the client side.
151
+
152
+
To optimize network connection performance:
153
+
154
+
Alternatively ipv6 can be enabled in the model server using `--grpc_bind_address` and `--rest_bind_address`.
OpenVINO Model Server in C++ implementation is using scalable multithreaded gRPC and REST interface, however in some hardware configuration it might become a bottleneck for high performance backend with OpenVINO.
OpenVINO Model Server currently does not provide access restrictions and traffic encryption on gRPC and REST API endpoints. The endpoints can be secured using network settings like docker network settings or network firewall on the host. The recommended configuration is to place OpenVINO Model Server behind any reverse proxy component or load balancer, which provides traffic encryption and user authorization.
15
15
16
+
When deploying in environments where only local access is required, administrators can configure the server to bind exclusively to localhost addresses. This can be achieved by setting the bind address to `127.0.0.1` for IPv4 or `::1` for IPv6, which restricts incoming connections to the local machine only. This configuration prevents external network access to the server endpoints, providing an additional layer of security for local development or testing environments.
0 commit comments