Service Configuration Items
- If StreamServer uses the HTTPS service, the private key of the server certificate cannot be in plaintext. You need to use the Huawei KMC component to manage the key. In this case, install the haveged service to prevent random number blocking. For details about how to install haveged, see the installation description on its official website. For example, you can run the apt-get install -y haveged command to install the haveged service in Ubuntu. Ensure that the source of the software to be installed is valid and verify its integrity before the installation.
The time for the client to maintain the connection depends on keepAlive set on the server. Set the keep-alive period for TCP connections, number of detection times, and detection interval as required.
- You are advised to use the inference service as a user with low OS permissions, instead of the root user.
- The listening IP address is fixed to 127.0.0.1.
Configuration Item |
Description |
Mandatory/Optional |
Modifiable or Not |
|---|---|---|---|
server_name |
Name of the inference service. The name of the original configuration file defaults to StreamServer after the RUN package is installed. Do not contain sensitive information. If the value is not specified, the default value is used. |
No |
Yes |
infer_config_repo |
Storage directory of the inference configuration file repository. For the original configuration file generated after the RUN package is installed, the value defaults to inferConfigRepository. The inference service recursively scans all inference configuration files (JSON files) in this directory. For each configuration file, the inference service attempts to start the file-related service. If the hardware resources are used up, the service fails to be started. The inference service limits the hierarchical depth of the inferConfigRepository folder. The maximum number of layers is 10 and the maximum number of files and folders is 100 (including the inferConfigRepository folder itself). If the preceding conditions are not met, the inference server cannot be started. If the value is not specified, the default value is used. |
No |
Yes |
request_cache_size |
Size of the request buffer of each inference service. For the original configuration file generated after the RUN package is installed, the value defaults to 120. The value range is [1, 1000]. The minimum or maximum value is read if the actual value is out of the range. If the value is not specified, the default value is used. |
No |
Yes |
max_request_rate |
Rate limit for client requests. For the original configuration file generated after the RUN package is installed, there are 20 requests per second. The value range is [1, 30]. The minimum or maximum value is read if the actual value is out of the range. If the value is not specified, the default value is used. |
No |
Yes |
max_content_length |
Maximum size of a request packet sent by a client. For the original configuration file generated after the RUN package is installed, the total size of the packet and request header is less than 20480 KB (20 MB). The unit is KB and the value range is [1, 51200]. The minimum or maximum value is read if the actual value is out of the range. You are advised to deploy Nginx before deploying the HTTPS server to enhance traffic control. If the value is not specified, the default value is used. |
No |
Yes |
port |
Listening port number of the inference service. The value range is [1025, 65535]. For the original configuration file generated after the RUN package is installed, the value defaults to 8080. The minimum or maximum value is read if the actual value is out of the range. If the value is not specified, the default value is used. |
No |
Yes |
server_crt |
Path of the server.crt file, which is issued by the CA. The file owner of the target path is the Vision SDK installation user and the permission is 400. This configuration item is managed by the certificate import script. |
No |
Yes |
server_key |
Path of the server certificate private key file server.key. Use the encrypted private key file. The file owner of the target path is the Vision SDK installation user and the permission is 400. This configuration item is managed by the certificate import script. |
No |
Yes |
ca_crt |
Path of the CA certificate ca.crt. The file owner of the target path is the Vision SDK installation user and the permission is 400. This configuration item is managed by the certificate import script. |
No |
Yes |
crl |
Path of the ca.crl file. The file owner of the target path is the Vision SDK installation user and the permission is 400. Set this parameter only when a local CRL is required. This configuration item is managed by the certificate import script. |
No |
Yes |
server_key_mm |
Ciphertext of the server private key, which is managed by Huawei KMC. The plaintext key is not allowed, and you are advised not to manually modify this parameter. The maximum length of the private key is 400 bits. |
No |
Yes |
cipher_list |
Protocol algorithm suite. For the original configuration file generated after the RUN package is installed, the default value does not need to be changed. Multiple suites are separated by colons (:). This configuration item must not be empty. StreamServer supports the following algorithm suites: ECDHE-ECDSA-AES128-CCM, ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-GCM-SHA256, and ECDHE-RSA-AES256-GCM-SHA384. |
No |
Yes |
sdp_algorithm_id |
KMC encryption algorithm function, which is set by ID. For the original configuration file generated after the RUN package is installed, the value defaults to 9, indicating the AES256_GCM encryption algorithm. This configuration item must not be empty. The value can only be 8 (AES128_GCM) or 9 (AES256_GCM). |
No |
Yes |
log_dir |
Log path of the StreamServer inference service. The path is a relative path. The default value is logs. The absolute path is the combination path of /log/mindxsdk and log_dir in the home directory. This configuration item must not be empty. |
No |
Yes |
max_log_size |
Maximum size of a log file, in MB. For the original configuration file generated after the RUN package is installed, the value defaults to 10. The value range is [1, 20]. The minimum or maximum value is read if the actual value is out of the range. This configuration item must not be empty. |
No |
Yes |
rotate_file_number |
Number of log files to be rolled back. For the original configuration file generated after the RUN package is installed, the value defaults to 50. The value range is [1, 500]. The minimum or maximum value is read if the actual value is out of the range. This configuration item must not be empty. |
No |
Yes |