Configuration parameters of services#
This section provides parameters for each service and their detailed description.
Parameters (also called settings) are adjustable values that control the operation of services.
- Index Manager service configuration
- Indexed Matcher service configuration
- Indexer service configuration
- Matching plugin configuration
- Detailed description of settings
Index Manager service configuration#
You can configure the service using the Configurator service.
The section describes the Index Manager service parameters:
- LIM_MANAGER_HTTP_SETTINGS
- LIM_MANAGER_HTTP_SETTINGS
- LIM_MANAGER_DB
- LUNA_MONITORING
- LUNA_FACES_ADDRESS
- LUNA_FACES_TIMEOUTS
- LUNA_SERVICE_METRICS
- INDEX_STORAGE_S3
- LIM_MANAGER_INDEXING
- Other settings
Indexed Matcher service configuration#
You can configure the service using the Configurator service.
The section describes the Indexed Matcher service parameters:
- LIM_MATCHER_LOGGER
- LIM_MATCHER_HTTP_SETTINGS
- LIM_MATCHER_DB
- LUNA_MONITORING
- LUNA_FACES_ADDRESS
- LUNA_FACES_TIMEOUTS
- LUNA_LICENSES_ADDRESS
- LUNA_SERVICE_METRICS
- INDEX_STORAGE_S3
- LIM_MATCHING
- LIM_MATCHER_REFRESH
- Other settings
Indexer service configuration#
You can configure the service using the Configurator service.
The section describes the Indexer service parameters:
- LIM_INDEXER_LOGGER
- LIM_INDEXER_HTTP_SETTINGS
- LUNA_MONITORING
- LUNA_FACES_ADDRESS
- LUNA_FACES_TIMEOUTS
- LUNA_SERVICE_METRICS
- INDEX_STORAGE_S3
- Other settings
Matching plugin configuration#
The section describes the Matching plugin parameters:
Detailed description of settings#
LIM_SERVICE_NAME_LOGGER section#
SERVICE_NAME — the name of the service in the setting, for example "LIM_MANAGER_LOGGER".
This section sets the settings for the logging.
log_level#
The parameter sets the level of debug printing, by priority: "ERROR", "WARNING", "INFO", "DEBUG".
Setting format: string
.
Default value: INFO
.
log_time#
The parameter sets the time format used in log entries. The following values are available:
- "LOCAL" — displays the local time of the system on which the logs are being recorded.
- "UTC" — displays Coordinated Universal Time, which is a time standard and is not affected by local time zones or seasonal time changes.
Setting format: string
.
Default value: LOCAL
.
log_to_stdout#
The parameter enables you to send logs to standard output (stdout).
Setting format: boolean
.
Default value: true
.
log_to_file#
The parameter enables you to save logs to a file. The directory with log files is specified in the "folder_with_logs" parameter.
Note: When enabling saving logs to a file, please consider:
- the need to control the size of logs to avoid storage overflow;
- automatic deletion of logs when the container is restarted (requires the use of the
volume
argument).
Setting format: boolean
.
Default value: false
.
folder_with_logs#
The parameter sets the directory in which logs are stored. The relative path starts from the application directory.
To use this parameter, you must enable the "log_to_file" parameter.
Setting format: string
.
Default value: ./
Example:
"folder_with_logs": "/srv/logs"
max_log_file_size#
The parameter sets the maximum size of the log file in MB before performing its rotation (0 — do not use rotation).
To use this parameter, you must enable the "log_to_file" parameter.
If necessary, you can configure Docker log rotation. See the section "Docker log rotation" in the LUNA PLATFORM installation manual.
Setting format: integer
.
Default value: 1024
.
multiline_stack_trace#
The parameter enables multi-line stack tracing in logs. When the parameter is enabled, information about the call stack is recorded in the logs so that each stack frame is placed on a separate line, which improves readability. If the parameter is disabled, information about the call stack is recorded on one line, which may make logs less convenient for analysis.
Setting format: boolean
.
Default value: true
.
format#
The parameter defines the format of the output logs. The following values are available:
- "default" — standard output format of the LUNA PLATFORM logs.
- "json" — output of logs in json format.
- "ecs" — output of logs in ECS format (Elastic Common Schema).
When using the "ecs" value, the following fields will be used:
- "http.response.status_code" — contains the HTTP response status code (e.g., 200, 404, 500, etc.).
- "http.response.execution_time" — contains information about the time taken to execute the request and receive the response.
- "http.request.method" — contains the HTTP request method (GET, POST, PUT, etc.).
- "url.path" — contains the path in the request's URL.
- "error.code" — contains the error code if the request results in an error.
Setting format: string
.
Default value: default
.
LIM_SERVICE_NAME_HTTP_SETTINGS section#
SERVICE_NAME — the name of the service in the setting, for example "LIM_MATCHER_HTTP_SETTINGS".
This section contains parameters responsible for process HTTP connections. More detail see here.
request_timeout#
The parameter sets the duration of time between the instant when a new open TCP connection is passed to the server, and the instant when the whole HTTP request is received.
Setting format: integer
(seconds).
Default value: 60
.
response_timeout#
The parameter sets the duration of time between the instant the server passes the HTTP request to the app, and the instant a HTTP response is sent to the client.
Setting format: integer
(seconds).
Default value: 600
.
request_max_size#
The parameter sets the maximum size of the request.
Setting format: integer
(bytes).
Default value: 1073741824
.
keep_alive_timeout#
This parameter specifies the time during which the server keeps the HTTP connection open after processing a request, waiting for possible subsequent requests from the client.
Setting format: integer
(seconds).
Default value: 15
.
LIM_SERVICE_NAME_DB section#
SERVICE_NAME — the name of the service in the setting, for example "LIM_MANAGER_DB".
In this section, the settings for connecting to the database of SERVICE_NAME service are set.
db_user#
The parameter sets the name of the Redis database user.
Setting format: string
.
Default value is not set.
db_password#
This parameter sets the password of the Redis database user.
Setting format: string
.
Default value is not set.
db_host#
The parameter sets the host of the Redis database.
Setting format: string
.
Default value: 127.0.0.1
.
db_port#
The parameter sets the port of the Redis database.
Setting format: string
.
Default value: 6379
.
db_settings > connection_pool_size#
This parameter sets the size of the pool of connections to the Redis database.
Setting format: string
.
Default value: 100
.
db_number#
The parameter sets the number of the Redis database. Each number corresponds to a separate database, which enables you to separate the data.
Setting format: integer
.
Default value: 0
.
sentinel > master_name#
The parameter sets the name of the Redis database master, which is monitored and managed by the Sentinel system.
Setting format: string
.
Default value for services:
- Index Manager —
index_manager
; - Indexed Matcher —
indexed_matcher
.
sentinel > sentinels#
The parameter sets the list of addresses and ports of Sentinel servers that will be used by clients to detect and monitor the Redis database.
Setting format: list > string
.
Default value: []
.
sentinel > user#
The parameter sets the user name of the Sentinel server.
Setting format: string
.
Default value: Not specified.
sentinel > password#
The parameter sets the password of the Sentinel server user.
Setting format: string
.
Default value: Not specified.
LUNA_MONITORING section#
In this section, settings for monitoring are set.
For more information about monitoring, see "Monitoring" section.
storage_type#
The storage type for storing monitoring data.
Currently, only the Influx DB is available.
Setting format: string
.
Default value for all services: influx
.
send_data_for_monitoring#
The parameter enables you to enable or disable sending monitoring data to InfluxDB.
Setting format: integer
.
Default value for all services: 1
.
use_ssl#
The parameter enables you to use HTTPS to connect to InfluxDB.
Setting format: integer
.
Default value for all services: 0
.
organization#
The parameter sets InfluxDB workspace.
Setting format: string
.
Default value for all services: luna
.
token#
The parameter sets InfluxDB authentication token.
Setting format: string
.
Default value for all services: secret-token
.
bucket#
The parameter sets InfluxDB bucket name.
Setting format: string
.
Default value for all services: luna_monitoring
.
host#
The parameter sets IP address of server with InfluxDB.
Setting format: string
.
Default value for all services: 127.0.0.1
.
port#
The parameter sets InfluxDB port.
Setting format: string
.
Default value for all services: 8086
.
flushing_period#
The parameter sets frequency of sending monitoring data to InfluxDB.
Setting format: integer
(seconds).
Default value for all services: 1
.
LUNA_FACES_ADDRESS section#
This section sets the connection settings for the Faces service.
origin#
The parameter sets the protocol, IP address and port of the Faces service.
The IP address "127.0.0.1" means that the Faces service located on the server with Configurator will be used. If the service is located on another server, then in this parameter you need to specify the correct IP address of the server with the Faces service running.
Setting format: string
.
Default value: http://127.0.0.1:5030
.
api_version#
The parameter sets the version of the Faces service. The available API version is "3".
Setting format: integer
.
Default value: 3
.
LUNA_FACES_TIMEOUTS section#
This section sets time intervals for managing the timeouts of HTTP requests that are sent to the Faces service.
connect#
The parameter sets the timeout for establishing a connection when sending an HTTP request to the Faces service. This is the timeout during which the client tries to establish a connection with the service.
Setting format: integer
(seconds).
Default value: 20
.
request#
The parameter sets a general timeout for the entire HTTP request. It includes the time to establish a connection, send a request, receive a response, and close the connection. If the entire process takes longer than specified in this parameter, the request will be aborted.
Setting format: integer
(seconds).
Default value: 60
.
sock_connect#
The parameter sets the timeout for establishing a connection at the socket level. If the socket level connection is not established at the set time, the operation will be aborted.
Setting format: integer
(seconds).
Default value: 10
.
sock_read#
The parameter sets the timeout for reading data from the socket after a successful connection. If the data does not arrive at the set time, the read operation will be interrupted.
Setting format: integer
(seconds).
Default value: 60
.
LUNA_SERVICE_METRICS section#
This section enables and configures the collection of metrics in the Prometheus format.
See "Monitoring" for details.
enabled#
The parameter enables metrics collection.
If metrics collection is disabled, a request to the /metrics
resource will return an appropriate message.
Setting format: boolean
.
Default value: false
.
metrics_format#
The parameter sets the metrics format.
Currently only the Prometheus format is supported.
See the official Prometheus documentation for more details.
Setting format: string
.
Default value: prometheus
.
extra_labels#
The parameter specifies custom label types.
Setting format: label_name=label_value
.
Default value is not set.
LIM_MANAGER_INDEXING section#
This section sets the indexing settings set by the Index Manager service.
indexer_origins#
The parameter sets the list of addresses of running instances of the Indexer service.
Setting format: array > string
.
Default value: http://127.0.0.1:5180
.
planning_period#
The parameter sets the period of the background routines, which checks the sets of lists that need to be indexed.
If the "planning_schedule" parameter is set, the "planning_period" parameter will be ignored.
If both parameters are set, then the "planning_schedule" parameter will take precedence.
Setting format: integer
(seconds).
Default value: 600
.
planning_schedule#
The parameter sets the schedule for the background routines in Cron format, which checks the sets of lists that need to be indexed.
Using a schedule provides accurate knowledge of the indexing execution time compared to periodic runs every few hours or minutes. This ensures a more predictable and controlled execution of indexing, as well as avoids time shifts that can occur with periodic runs. For example, if the service is unavailable or other issues arise, a periodic run may be skipped, which can disrupt the index update plans. However, it is important to consider that periodic runs also have their advantages. For instance, if the aim is to update the index every hour without the need for complex scheduling configurations.
The week number in Cron format starts from Sunday. For example, the value "0 0 * * 0 " means that indexing will be performed at 00:00 every Sunday.
If the "planning_schedule" parameter is set, the "planning_period" parameter will be ignored.
If both parameters are set, then the "planning_schedule" parameter will take precedence.
Setting format: string
(Cron-like).
Default value is not set.
lookup_period#
The parameter sets the period of the search routine, which checks the statuses of all running Indexer instances.
Setting format: integer
(seconds).
Default value: 5
.
face_lists > min_indexing_list_size#
The parameter sets the minimum number of faces in the lists for the list to be indexed.
The parameter is used only when using the parameter "indexing_lists" with the value "dynamic".
Setting format: integer
.
Default value: 50000
.
face_lists > indexing_lists#
The parameter sets a set of lists for indexing.
You can either specify lists explicitly or specify the value "dynamic". In the latter case, all lists will be processed whose number of face descriptors exceeds the number specified in the "min_indexing_list_size" parameter.
Setting format: array > string
.
Default value: dynamic
.
ef_construction#
The parameter sets a limit on the number of nearest neighbors considered when constructing the index.
Higher values result in a more accurate graph, but it takes longer to build.
It is recommended to change the parameter together with the "ef_search" parameter of the Indexed Matcher service.
Setting format: integer
.
Default value: 1600
.
rebuild_rules > default#
The parameter sets a full index rebuild instead of an index update.
See "Index rebuilding and refreshing setting" for details.
The setting format is boolean
.
The default value is true
.
rebuild_rules > max_removal_for_rebuild#
The parameter sets the allowed number of descriptors deletions since the index was created.
See "Index rebuilding and refreshing setting" for details.
The setting format is integer
.
The default value is 0
.
LIM_MATCHING section#
This section sets the settings for indexed matching.
ef_search#
The parameter sets a limit on the considered number of nearest neighbors when searching for an index.
Higher values result in a more accurate but slower search.
It is recommended to change the parameter together with the "ef_construction" parameter of the Indexed Manager service.
Setting format: integer
.
Default value: 3200
.
LIM_MATCHER_REFRESH section#
In this section, the settings for index refreshing in the Indexed Matcher service memory are set.
enabled#
The parameter allows you to enable index refreshing.
Setting format: boolean
.
Default value: true
.
LUNA_LICENSES_ADDRESS section#
This section sets the connection settings for the Licenses service.
origin#
The parameter sets the protocol, IP address and port of the Licenses service.
The IP address "127.0.0.1" means that the Licenses service located on the server with Configurator will be used. If the service is located on another server, then in this parameter you need to specify the correct IP address of the server with the Licenses service running.
Setting format: string
.
Default value: http://127.0.0.1:5120
.
api_version#
The parameter sets the version of the Licenses service. The available API version is "1".
Setting format: integer
.
Default value: 1
.
INDEX_STORAGE_S3 section#
bucket#
The parameter sets the name of the bucket for storing indexes in S3-like storage.
Setting format: string
.
Default value: index-bucket
.
host#
The parameter sets the URL address to establish a connection with the S3 storage.
Setting format: string
Default value: http://localhost:7480
.
region#
The parameter specifies the region to be used when interacting with S3 storage.
The region can affect the availability and performance of various resources in AWS S3.
Setting format: string
.
Default value: Not specified.
aws_public_access_key#
The parameter specifies the public access key used for authentication when accessing the S3 storage. This key is provided by AWS and is used to identify the client.
Setting format: string
.
Default value: Not specified.
aws_secret_access_key#
The parameter sets the secret access key, which, in combination with the public key, provides authentication when accessing the S3 storage.
Setting format: string
Default value: Not specified.
authorization_signature#
The parameter determines the method used to create an authentication signature when performing operations with S3.
Two values can be specified:
- "s3v4" — using the AWS S3 Version 4 signature algorithm.
- "s3v2" — using the AWS S3 Version 2 signature algorithm.
Setting format: string
.
Default value: s3v4
.
request_timeout#
The parameter sets the maximum time within which a request to the S3 storage must be completed. If the request does not complete within this time, it will be canceled.
Setting format: integer
(seconds).
Default value: 60
.
connect_timeout#
The parameter sets the maximum waiting time for establishing a connection with the S3 storage. If the connection is not established within this time, it will be considered unsuccessful.
Setting format: integer
(seconds).
Default value: 30
.
verify_ssl#
The parameter determines whether to perform SSL certificate verification when establishing a secure (HTTPS) connection with the S3 storage. If the value is true
, the SSL certificate will be verified. If the value is false
, verification will be disabled, which may lead to security issues.
Setting format: boolean
.
Default value: false
.
LUNA_INDEXED_LIST_PLUGIN section#
This section is responsible for connecting the matching plugin with Redis when calculating matching cost.
It is possible to specify the Redis Sentinel address. See "Use Redis sentinel".
redis_url#
The parameter sets the Redis address.
Setting format: string
.
Default value: redis://localhost:6379
.
request_timeout#
The parameter sets the connection timeout to Redis.
Setting format: integer
.
Default value: 60
.
Other settings#
index_storage_type#
The parameter sets the index storage type. Two options are available:
- "LOCAL" - Indexes will be stored in the directory specified in the "index_storage_local" parameter.
- "S3" - Indexes will be stored in an S3-like storage, the connection to which is configured in the "INDEX_STORAGE_S3" section.
Setting format: string
.
Default value: LOCAL
.
index_storage_local#
The parameter sets the directory for storing indexes with "LOCAL" storage type.
Setting format: string
.
Default value: ./local_storage
.
default_face_descriptor_version#
The parameter sets the version of the face descriptor to use.
Setting format: integer
.
Default value: 65
.
storage_time#
The parameter sets the time format used for records in the database. The following values are available:
- "LOCAL" — displays the local time of the system on which logs are being recorded.
- "UTC" — displays coordinated universal time, which is a standard time and does not depend on the local time zone or seasonal time changes.
Setting format: string
.
Default value: LOCAL
.
lim_SERVICE_NAME_active_plugins#
SERVICE_NAME — the name of the service in the setting, for example "lim_matcher_active_plugins".
The parameter sets a list of plugins that the service should use.
The names are given in the following format:
[
"plugin_1",
"plugin_2",
"plugin_3"
]
The list should contain file names without the extension (.py).
Setting format: array > string
.
Default value: Not specified.
lim_matcher_cache#
The parameter sets the path to the directory with the cache.
For more information about caching, see "Index caching".
To disable caching, leave the field empty.
Setting format: string
.
Default value: not set.