Configuration parameters of services#
This section provides parameters for each LUNA Vinder Module service and their detailed description.
Parameters (also called settings) are adjustable values that control the operation of services.
- Projector service configuration
- Matcher service configuration
- Matching plugin configuration
- Detailed description of settings
Projector service configuration#
You can configure the service using the Configurator service.
The section describes the Projector service parameters:
- LUNA_VINDER_PROJECTOR_HTTP_SETTINGS
- LUNA_VINDER_DB
- LUNA_MONITORING
- LUNA_SERVICE_METRICS
- LUNA_VINDER_PROJECTOR_LOGGER
- ADDITIONAL_SERVICES_USAGE
Matcher service configuration#
You can configure the service using the Configurator service.
The section describes the Matcher service parameters:
- LUNA_VINDER_MATCHER_HTTP_SETTINGS
- LUNA_EVENTS_DB
- LUNA_MONITORING
- LUNA_SERVICE_METRICS
- LUNA_VINDER_MATCHER_LOGGER
- ADDITIONAL_SERVICES_USAGE
- LUNA_VINDER_PROJECTOR_ADDRESS
- LUNA_VINDER_PROJECTOR_TIMEOUTS
- LUNA_VINDER_MATCHING
- LUNA_VINDER_SYNCHRONIZATION
- Прочие настройки
Matching plugin configuration#
The section describes the Matching plugin parameters:
Detailed description of settings#
LUNA_VINDER_SERVICE_NAME_LOGGER section#
SERVICE_NAME — the name of the service in the setting, for example "LUNA_VINDER_PROJECTOR_LOGGER" or "LUNA_VINDER_MATCHER_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
volumeargument).
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.
LUNA_VINDER_SERVICE_NAME_HTTP_SETTINGS section#
SERVICE_NAME — the name of the service in the setting, for example "LUNA_VINDER_PROJECTOR_HTTP_SETTINGS" or "LUNA_VINDER_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.
LUNA_SERVICE_NAME_DB section#
SERVICE_NAME — the name of the service in the setting, for example "LUNA_VINDER_DB" or "LUNA_EVENTS_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 database user.
Setting format: string.
Default value: "luna".
db_password#
This parameter sets the password of the database user.
Setting format: string.
Default value: "luna".
db_host#
The parameter sets the host of the database.
Setting format: string.
Default value: 127.0.0.1.
db_port#
The parameter sets the port of the database.
Setting format: string.
Default value: 5432.
db_settings > connection_pool_size#
This parameter sets the size of the pool of connections to the database.
Setting format: string.
The default value for services is:
- Events — 5;
- Projector — 10.
db_name#
The parameter specifies the database name for the "postgres" type.
Setting format: string.
Default value for services:
- Events —
luna_events; - Projector —
luna_vinder_projections.
db_type#
The parameter specifies the database type.
Setting format: string.
Default value: postgres.
dsn#
The parameter sets the DSN connection string for connecting to the database.
DSN is a connection string that identifies and points to the data source (database) to which you want to establish a connection.
Settings such as multiple hosts, authentication data, port, and other parameters can be set in the DSN string.
The settings depend on the type of database. Multiple hosts are supported only with PostgreSQL.
By default, the "dsn" parameter is not displayed in the "Settings" tab in the Configurator. You can check the list of all available parameters for a section on the "Limitations" tab.
Below is an example of specifying the "dsn" parameter:
{
"dsn": "luna:luna@postgres01:5432,postgres02:5432/luna_vinder_projections?some_option=some_value"
"db_settings": {
"connection_pool_size": 5
}
}
Here:
- "luna:luna" — Username and password for connecting to PostgreSQL.
- "@postgres01:5432,postgres02:5432" — Comma-separated list of hosts and ports. This means that the service will try to connect to the first host ("postgres01") on port 5432. If this fails, it will try to connect to the second host ("postgres02") also on port 5432.
- "/luna_vinder_projections" — Database name.
- "?some_option=some_value" — Optional parameters for connection.
If necessary, you can combine the DSN string and the classic settings, but the DSN string is a higher priority. You can partially fill in the DSN string (for example, "postgres 01,postgres02/luna_vinder_projections"), and then the missing parameters will be filled in from the values of the parameters "db_host", "db_port", "db_name", "db_user" and "db_password".
At startup, the service will create a pool of connections to one of the available DSN hosts. In case of problems with establishing a connection after several unsuccessful attempts, the service will again try to set up a connection pool to any of the available DSN hosts.
LUNA_MONITORING section#
This group of parameters specifies monitoring settings.
See detailed information about monitoring in the "Monitoring" section.
storage_type#
This parameter determines the storage type used to store monitoring data. Two options are available:
- "influx"
- "clickhouse"
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/ClickHouse.
Setting format: integer.
Default value for all services: 1.
use_ssl#
The parameter enables you to use HTTPS to connect to InfluxDB/ClickHouse.
Setting format: integer.
Default value for all services: 0.
host#
The parameter sets IP address of server with InfluxDB/ClickHouse.
Setting format: string.
Default value for all services: 127.0.0.1.
port#
The parameter sets InfluxDB/ClickHouse port.
Setting format: string.
The default value for all services is:
- for
storage_type: influx—8086; - for
storage_type: clickhouse—9000.
flushing_period#
The parameter sets frequency of sending monitoring data to InfluxDB/ClickHouse.
Setting format: integer (seconds).
Default value for all services: 1.
organization#
This parameter only applies when using
storage_type: influx.
Setting format: string.
Default value for all services: luna.
token#
This parameter only applies when using
storage_type: influx.
Setting format: string.
Default value for all services: secret-token.
bucket#
This parameter only applies when using
storage_type: influx.
Setting format: string.
Default value for all services: luna_monitoring.
http_port#
This parameter only applies when using
storage_type: clickhouse.
This parameter specifies the HTTP port for recording monitoring data. The HTTP port is used for database operations.
Setting format: integer.
Default value for all services: 8123.
db_user#
This parameter only applies when using
storage_type: clickhouse.
The parameter specifies the name of the database user.
Setting format: string.
Default value for all services: luna.
db_password#
This parameter only applies when using
storage_type: clickhouse.
The parameter specifies the password of the database user.
Setting format: string.
Default value for all services: password.
db_name#
This parameter only applies when using
storage_type: clickhouse.
This parameter specifies the name of the ClickHouse database in which tables will be created and monitoring data will be stored.
Setting format: string.
Default value for all services: luna_monitoring.
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.
ADDITIONAL_SERVICES_USAGE section#
luna_events#
The parameter sets the possibility of using the Events service.
Enabling/disabling this service may affect the operation of other services.
Setting format: boolean ("false" or "true").
The default value for services that have this parameter group: true.
luna_faces#
The parameter sets the possibility of using the Faces service.
Enabling/disabling this service may affect the operation of other services.
Setting format: integer ("0" or "1").
The default value for services that have this parameter group: 1.
LUNA_VINDER_PROJECTOR_ADDRESS section#
This section sets the connection settings for the Projector service.
origin#
The parameter sets the protocol, IP address and port of the Projector service.
The IP address "127.0.0.1" means that the Projector 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 Projector service running.
Setting format: string.
Default value: http://127.0.0.1:5260.
api_version#
The parameter sets the version of the Projector service. The available API version is "1".
Setting format: integer.
Default value: 1.
LUNA_VINDER_PROJECTOR_TIMEOUTS section#
This section sets time intervals for managing the timeouts of HTTP requests that are sent to the Projector service.
connect#
The parameter sets the timeout for establishing a connection when sending an HTTP request to the Projector 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_VINDER_MATCHING section#
This group of parameters defines the performance settings of the Matcher service.
thread_count#
This parameter determines how many parallel threads Matcher uses for comparison operations. The optimal value depends on your system's hardware configuration. If your system has fewer CPU cores than the specified number of threads, there may be no performance gain, as threads will compete for processor resources. In such cases, it is recommended to set the thread_count value equal to the number of available CPU cores.
The impact of the number of threads on performance can be significant. For example, increasing the number of threads from 8 to 16 can speed up comparison operations by up to 2x on systems with sufficient CPU cores. The actual speedup depends on your workload, index size, and hardware configuration.
When setting the thread_count parameter, consider typical request patterns and concurrent load. If your service processes many concurrent comparison requests, increasing the number of threads will improve throughput. If requests are typically sequential or your hardware has a limited number of cores, a lower thread count may be appropriate.
Setting format: integer.
Default value: 16.
LUNA_VINDER_SYNCHRONIZATION section#
This group of parameters defines the data synchronization settings for the Matcher service.
period#
This parameter specifies how often Matcher synchronizes data with other services. Lower values ensure more current data but increase the system load.
Setting format: number (в секундах).
Default value: 1.
batch_size#
This parameter determines the maximum number of records processed in a single synchronization cycle. It helps control the system load when handling large amounts of data.
Setting format: integer.
Default value: 10000.
LUNA_VINDER_PLUGIN section#
This parameter allows you to customize the operation of the matching plugin, which integrates LUNA Vector Search Module with other system components.
Setting format: object.
Default value is not set.
Others#
default_face_descriptor_version#
The parameter sets the version of the face descriptor to use.
Setting format: string.
Default value for services that have this parameter: 65.
Note: For detailed information about biometric template versions, see the "Neural networks" section of the LUNA PLATFORM Administrator manual.
default_human_descriptor_version#
The parameter specifies the version of the body biometric template to use.
Setting format: string.
Default value: 116.
Note: For detailed information about biometric template versions, see the "Neural networks" section of the LUNA PLATFORM Administrator manual.
luna_vinder_indexes#
This parameter defines the index configuration for the Matcher service. Indexes optimize searches by specified projection fields.
This parameter is a list of indexes, each containing:
-
projection_id— projection ID -
index_composite_fields— an ordered list of fields to index (from lowest to highest cardinality). See the Index components section.
Setting format: object.
Default value is not set.