Skip to content

LUNA Index Module v.5.59.0#

LIM changes

  • The ability to configure the scheduling of the planning routine in Cron format has been added, which checks 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.

    For example, you can specify the value "0 0 * * 0", which means that indexing will be performed at 00:00 every Sunday.

    By default, the "planning_schedule" parameter is not set.

    If the "planning_schedule" parameter is set, the "planning_period" parameter will be ignored.

    If both parameters are set, the "planning_schedule" parameter takes priority.

  • The ability to set the following environment variables when starting LIM containers has been added:

    • LIM_MANAGER_MASTER_LOCK — Redis lock name for the Index Manager master instance. This lock is used to ensure that only one instance of the Index Manager can perform planning and searching routines.
    • LIM_MATCHER_CONSUMER — Redis consumer group name for matching requests.
    • LIM_MATCHER_LOCK_PREFIX — Prefix for the lock name of the Indexed Matcher service in Redis. This helps to avoid potential naming conflicts with other Redis users.
  • A new resource /metrics has been added to all LIM services, enabling you to collect and save metrics in the Prometheus format as time series data that can be used to track service behavior.

    By default, metrics collection is disabled. Metrics collection is enabled in the "enabled" parameter in the "LUNA_SERVICE_METRICS" section. If metrics collection is disabled, then a request to the /metrics resource will return an error with the code "12049" and the message "Forbidden, Resource is disabled".

    There are two types of metrics available:

    • request_count_total — Total number of requests.
    • errors_count_total — Total number of errors.

    Each of them has at least two labels for sorting:

    • status_code (or error_code for error metrics)
    • path — Path consisting of the request method and the endpoint route.

    If necessary, you can add custom label types by specifying the label_name=label_value pair in the "extra_labels" parameter in the "LUNA_SERVICE_METRICS" section.

    See "Export metrics in Prometheus format" for details.