frostfs-node/cmd/frostfs-cli/docs/storage-node-xheaders.md
Denis Kirillov 342e571d89
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/pre-commit Pipeline was successful
[#159] Add handle __SYSTEM__ sys attributes
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-22 17:35:20 +03:00

1.5 KiB

Extended headers

Overview

Extended headers are used for request/response. They may contain any user-defined headers to be interpreted on application level. Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or Responses with duplicated header names or headers with empty values are considered invalid.

Existing headers

There are some "well-known" headers starting with __SYSTEM__ prefix that affect system behaviour. For backward compatibility, the same set of "well-known" headers may also use __NEOFS__ prefix:

  • __SYSTEM__NETMAP_EPOCH - netmap epoch to use for object placement calculation. The value is string encoded uint64 in decimal presentation. If set to '0' or omitted, the current epoch only will be used.
  • __SYSTEM__NETMAP_LOOKUP_DEPTH - if object can't be found using current epoch's netmap, this header limits how many past epochs the node can look up through. Depth is applied to a current epoch or the value of __SYSTEM__NETMAP_EPOCH attribute. The value is string encoded uint64 in decimal presentation. If set to '0' or not set, only the current epoch is used.

frostfs-cli commands with --xhdr

List of commands with support of extended headers:

  • container list-objects
  • object delete/get/hash/head/lock/put/range/search
  • storagegroup delete/get/list/put

Example:

$ frostfs-cli object put -r s01.frostfs.devenv:8080 -w wallet.json --cid CID --file FILE --xhdr "__SYSTEM__NETMAP_EPOCH=777"