frostfs-s3-lifecycler/docs/configuration.md
Denis Kirillov 8b6d93c94d [#20] Add metric to see number of dropped logs
Add new metric frostfs_s3_lifecycler_statistic_dropped_logs
Also, configuration sampling interval is added

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-09-24 17:47:03 +03:00

14 KiB

FrostFS S3 Lifecycler configuration

This section contains detailed FrostFS S3 Lifecycler component configuration description.

Structure

Section Description
wallet Wallet configuration
logger Logger configuration
pprof Pprof configuration
prometheus Prometheus configuration
morph Morph configuration
credential_source Credential source configuration
lifecycle Lifecycle configuration
frostfs FrostFS configuration

Reload on SIGHUP

Some config values can be reloaded on SIGHUP signal. Such parameters have special mark in tables below.

You can send SIGHUP signal to app using the following command:

$ kill -s SIGHUP <app_pid>

wallet section

Configuration of key for lifecycle service.

wallet:
  path: /path/to/wallet.json
  address: Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn
  passphrase: ""
Parameter Type Default value Description
path string Path to wallet
address string Account address to get from wallet. If omitted default one will be used.
passphrase string Passphrase to decrypt wallet.

logger section

logger:
  level: info
  destination: stdout
  sampling:
    enabled: false
    initial: 100
    thereafter: 100
    interval: 1s
  tags:
    - "expiration_delete_object"
    - "multipart_delete_object"
Parameter Type SIGHUP reload Default value Description
level string yes info Logging level. Possible values: debug, info, warn, dpanic, panic, fatal.
destination string no stdout Destination for logger: stdout or journald
sampling.enabled bool no false Enable sampling.
sampling.initial int no 100 Logs firth N of the same (level and message) log entries each interval.
sampling.thereafter int no 100 Logs every Mth of the same (level and message) log entries after first N entries in that interval.
sampling.interval duration no 1s Sampling interval.
sampling.tags []string no Tagged log entries that should be additionally logged (available tags see in the next section).

Tags

There are additional log entries that can hurt performance and can be additionally logged by using logger.tags parameter. Available tags:

  • expiration_delete_object
  • expiration_process_version
  • expiration_remove_version
  • multipart_delete_object
  • multipart_process_upload

pprof section

Contains configuration for the pprof profiler.

pprof:
  enabled: false
  address: localhost:8077
Parameter Type SIGHUP reload Default value Description
enabled bool yes false Flag to enable pprof service.
address string yes Address that pprof service listener binds to.

prometheus section

Contains configuration for the prometheus metrics service.

prometheus:
  enabled: false
  address: localhost:8078
Parameter Type SIGHUP reload Default value Description
enabled bool yes false Flag to enable prometheus service.
address string yes Address that prometheus service listener binds to.

morph section

Contains configuration for the morph chain.

morph:
  rpc_endpoint:
    - address: wss://rpc1.morph.frostfs.info:40341/ws
      priority: 0
      trusted_ca_list:
        - "/path/to/ca.pem"
      certificate: "/path/to/cert"
      key: "/path/to/key"
    - address: wss://rpc2.morph.frostfs.info:40341/ws
      priority: 2
  reconnect_clients_interval: 30s
  dial_timeout: 5s
  contract:
    netmap: netmap.frostfs
    frostfsid: frostfsid.frostfs
Parameter Type SIGHUP reload Default value Description
rpc_endpoint.address string no The address of the RPC host to connect.
rpc_endpoint.priority int no Priority of RPC endpoint.
rpc_endpoint.trusted_ca_list []string no List of paths to CAs to use in mTLS configuration.
rpc_endpoint.certificate string no Path to certificate to use in mTLS configuration.
rpc_endpoint.key string no Path to key to use in mTLS configuration.
reconnect_clients_interval string no 30s When all endpoints are failed. Overall connection be reinitialized. This value is time between retries.
reconnect_clients_interval string no 5s Dial timeout to connect to morph endpoint.
contract.netmap string no netmap.frostfs Netmap contract hash (LE) or name in NNS.
contract.frostfsid string no frostfsid.frostfs FrostfsID contract hash (LE) or name in NNS. This contract is used to get all users to process their containers.
contract.container string no container.frostfs Container contract hash (LE) or name in NNS.

credential section

Contains configuration for the source of user private keys (credentials).

credential:
  use: wallets
  source:
    wallets:
      - path: /path/to/wallet.json
        address: NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP
        passphrase: ""
Parameter Type SIGHUP reload Default value Description
use string no Name of source to use.
source map no Available credential sources.

wallets subsection

Source of user private keys as wallets files on filesystem.

credential:
  source:
    wallets:
      - path: /path/to/wallet.json
        address: NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP
        passphrase: ""
Parameter Type SIGHUP reload Default value Description
path string no Path to wallet on filesystem.
address string no Account address in wallet. If omitted default one will be used.
passphrase string no Passphrase to decrypt wallet.

lifecycle section

Configuration for main lifecycle handling procedure.

lifecycle:
  job_fetcher_buffer: 1000
  executor_pool_size: 100
  services:
    - 0313b1ac3a8076e155a7e797b24f0b650cccad5941ea59d7cfd51a024a8b2a06bf
Parameter Type SIGHUP reload Default value Description
job_fetcher_buffer int no 1000 Size for buffered channel to fetch users/container and other data for lifecycle procedure. This param helps reduce number concurrent outgoing network requests.
executor_pool_size int no 100 Worker pool size to tidy container up (according to lifecycle configuration).
services []string yes List of Lifecycle services public keys. Needs to split jobs.

frostfs section

Configuration for FrostFS storage.

frostfs:
  stream_timeout: 10s
  connect_timeout: 10s
  healthcheck_timeout: 5s
  rebalance_interval: 1m
  pool_error_threshold: 100
  tree_pool_max_attempts: 4

  peers:
    0:
      address: node1.frostfs:8080
      priority: 1
      weight: 1
    1:
      address: node2.frostfs:8080
      priority: 2
      weight: 0.1
    2:
      address: node3.frostfs:8080
      priority: 2
      weight: 0.9
Parameter Type SIGHUP reload Default value Description
stream_timeout duration no 10s Timeout for individual operations in streaming RPC.
connect_timeout duration no 10s Timeout to connect to a storage node.
healthcheck_timeout duration no 15s Timeout to check storage node health during rebalance.
rebalance_interval duration no 60s Interval to check storage node health.
pool_error_threshold uint32 no 100 The number of errors on connection after which storage node is considered as unhealthy.
tree_pool_max_attempts uint32 no 0 Sets max attempt to make successful tree request. Value 0 means the number of attempts equals to number of nodes in pool.

peers section

This configuration makes TO-IAM use the first node (node1.frostfs:8080) while it's healthy. Otherwise, TO-IAM uses the second node (node2.frostfs:8080) for 10% of requests and the third node (node3.frostfs:8080) for 90% of requests. Until nodes with the same priority level are healthy nodes with other priority are not used. The lower the value, the higher the priority.

Parameter Type Default value Description
peers.address string Address of storage node.
peers.priority int 1 It allows to group nodes and don't switch group until all nodes with the same priority will be unhealthy. The lower the value, the higher the priority.
peers.weight float 1 Weight of node in the group with the same priority. Distribute requests to nodes proportionally to these values.