Here you can find schemas of dynamic configs used by userver itself. For general information on dynamic configs, see Dynamic config
Token bucket throttling options for new connections (socket(3)).
*-limit
- token bucket size, set to 0
to disable the limit*-per-second
- token bucket size refill speedschema:
type: object
properties:
http-limit:
type: integer
minimum: 0
http-per-second:
type: integer
minimum: 0
https-limit:
type: integer
minimum: 0
https-per-second:
type: integer
minimum: 0
per-host-limit:
type: integer
minimum: 0
per-host-per-second:
type: integer
minimum: 0
additionalProperties: false
required:
- http-limit
- https-limit
- per-host-limit
Example:
Used by components::HttpClient, affects the behavior of clients::http::Client and all the clients that use it.
Open connections pool size for curl (CURLMOPT_MAXCONNECTS). -1
means "detect by multiplying easy handles count on 4".
Example:
Used by components::HttpClient, affects the behavior of clients::http::Client and all the clients that use it.
Dynamic config that controls default $maxTimeMS for mongo requests (0 - disables default timeout).
schema:
type: integer
minimum: 0
Example:
Used by components::Mongo, components::MultiMongo.
Dynamic config that controls whether task-inherited deadline is accounted for while executing mongodb queries.
schema:
type: boolean
Example:
Used by components::Mongo, components::MultiMongo.
Dynamic config that controls default network and statement timeouts. Overrides the built-in timeouts from components::Postgres::kDefaultCommandControl, but could be overridden by POSTGRES_HANDLERS_COMMAND_CONTROL, POSTGRES_QUERIES_COMMAND_CONTROL and storages::postgres::CommandControl.
type: object
additionalProperties: false
properties:
network_timeout_ms:
type: integer
minimum: 1
statement_timeout_ms:
type: integer
minimum: 1
Example:
Used by components::Postgres.
Dynamic config that controls per-handle statement and network timeouts. Overrides POSTGRES_DEFAULT_COMMAND_CONTROL and built-in timeouts from components::Postgres::kDefaultCommandControl, but may be overridden by POSTGRES_QUERIES_COMMAND_CONTROL and storages::postgres::CommandControl.
type: object
additionalProperties:
$ref: "#/definitions/CommandControlByMethodMap"
definitions:
CommandControlByMethodMap:
type: object
additionalProperties:
$ref: "#/definitions/CommandControl"
CommandControl:
type: object
additionalProperties: false
properties:
network_timeout_ms:
type: integer
minimum: 1
statement_timeout_ms:
type: integer
minimum: 1
Example:
Used by components::Postgres.
Dynamic config that controls per-query/per-transaction statement and network timeouts, if those were not explicitly set via storages::postgres::CommandControl. Overrides the POSTGRES_HANDLERS_COMMAND_CONTROL, POSTGRES_QUERIES_COMMAND_CONTROL, POSTGRES_DEFAULT_COMMAND_CONTROL, and built-in timeouts from components::Postgres::kDefaultCommandControl.
Transaction timeouts in POSTGRES_QUERIES_COMMAND_CONTROL override the per-query timeouts in POSTGRES_QUERIES_COMMAND_CONTROL, so the latter are ignored if transaction timeouts are set.
type: object
additionalProperties:
$ref: "#/definitions/CommandControl"
definitions:
CommandControl:
type: object
additionalProperties: false
properties:
network_timeout_ms:
type: integer
minimum: 1
statement_timeout_ms:
type: integer
minimum: 1
Example:
Used by components::Postgres.
Dynamic config that controls connection pool settings of PostgreSQL driver.
Dictionary keys can be either the service component name (not database name!) or __default__
. The latter configuration is applied for every non-matching PostgreSQL component of the service.
Take note that it overrides the static configuration values of the service!
type: object
additionalProperties:
$ref: "#/definitions/PoolSettings"
definitions:
PoolSettings:
type: object
additionalProperties: false
properties:
min_pool_size:
type: integer
minimum: 0
max_pool_size:
type: integer
minimum: 1
max_queue_size:
type: integer
minimum: 1
connecting_limit:
type: integer
minimum: 0
required:
- min_pool_size
- max_pool_size
- max_queue_size
Example:
Used by components::Postgres.
Dynamic config that controls topology settings of service's PostgreSQL components.
Dictionary keys can be either the service component name (not database name!) or __default__
. The latter configuration is applied for every non-matching PostgreSQL component of the service.
Take note that it overrides the static configuration values of the service!
type: object
additionalProperties: false
properties:
max_replication_lag_ms:
type: integer
minimum: 0
description: maximum allowed replication lag. If equals 0 no replication
lag checks are performed
required:
- max_replication_lag_ms
Example
Used by components::Postgres.
Dynamic config that controls settings for newly created connections of PostgreSQL driver.
Dictionary keys can be either the service component name (not database name!) or __default__
. The latter configuration is applied for every non-matching PostgreSQL component of the service.
Take note that it overrides the static configuration values of the service!
type: object
additionalProperties: false
properties:
persistent-prepared-statements:
type: boolean
default: true
user-types-enabled:
type: boolean
default: true
max-prepared-cache-size:
type: integer
minimum: 1
default: 5000
recent-errors-threshold:
type: integer
minimum: 1
ignore-unused-query-params:
type: boolean
default: false
max-ttl-sec:
type integer
minimum: 1
Example:
Used by components::Postgres.
Dynamic config that enables connlimit_mode: auto for PostgreSQL connections. Auto mode ignores static and dynamic max_connections configs and verifies that the cluster services use max_connections equals to PostgreSQL server's max_connections divided by service instance count.
default: true
schema:
type: boolean
Used by components::Postgres.
Dynamic config that controls statement metrics settings for specific service.
Dictionary keys can be either the service component name (not database name!) or __default__
. The latter configuration is applied for every non-matching PostgreSQL component of the service.
The value of max_statement_metrics
controls the maximum size of LRU-cache for named statement metrics. When set to 0 (default) no metrics are being exported.
The exported data can be found as postgresql.statement_timings
.
type: object
additionalProperties:
$ref: "#/definitions/StatementMetricsSettings"
definitions:
StatementMetricsSettings:
type: object
additionalProperties: false
properties:
max_statement_metrics:
type: integer
minimum: 0
Used by components::Postgres.
Dynamic config that controls command buffering for specific service. Enabling of this config activates a delay in sending commands. When commands are sent, they are combined into a single tcp packet and sent together. First command arms timer and then during watch_command_timer_interval_us
commands are accumulated in the buffer
Command buffering is disabled by default.
type: object
additionalProperties: false
properties:
buffering_enabled:
type: boolean
commands_buffering_threshold:
type: integer
minimum: 1
watch_command_timer_interval_us:
type: integer
minimum: 0
required:
- buffering_enabled
- watch_command_timer_interval_us
Example:
Used by components::Redis.
Dynamic config that overrides the default timeouts, number of retries and server selection strategy for redis commands.
type: object
additionalProperties: false
properties:
best_dc_count:
type: integer
max_ping_latency_ms:
type: integer
max_retries:
type: integer
strategy:
enum:
- default
- every_dc
- local_dc_conductor
- nearest_server_ping
type: string
timeout_all_ms:
type: integer
timeout_single_ms:
type: integer
Example:
Used by components::Redis.
Dynamic config that controls the metric settings for specific service.
Dictionary keys can be either the database name (not the component name!) or __default__
. The latter configuration is applied for every non-matching Redis database/sentinel of the service.
type: object
additionalProperties:
$ref: "#/definitions/MetricsSettings"
definitions:
MetricsSettings:
type: object
additionalProperties: false
properties:
timings-enabled:
type: boolean
default: true
description: enable timings statistics
command-timings-enabled:
type: boolean
default: false
description: enable statistics for individual commands
request-sizes-enabled:
type: boolean
default: false
description: enable request sizes statistics
reply-sizes-enabled:
type: boolean
default: false
description: enable response sizes statistics
Example:
Used by components::Redis.
Dynamic config that controls the redis pubsub metric settings for specific service.
Dictionary keys can be either the database name (not the component name!) or __default__
. The latter configuration is applied for every non-matching Redis database/sentinel of the service.
type: object
additionalProperties:
$ref: "#/definitions/PubsubMetricsSettings"
definitions:
PubsubMetricsSettings:
type: object
additionalProperties: false
properties:
per-shard-stats-enabled:
type: boolean
default: true
description: enable collecting statistics by shard
Example:
Used by components::Redis.
Dynamic config that controls the retry budget (throttling) settings for components::Redis.
Dictionary keys can be either the database name (not the component name!) or __default__
. The latter configuration is applied for every non-matching Redis database/sentinel of the service.
type: object
additionalProperties:
$ref: '#/definitions/BaseSettings'
definitions:
BaseSettings:
type: object
additionalProperties: false
properties:
enabled:
description: Enable retry budget for database
type: boolean
max-tokens:
description: Number of tokens to start with
type: number
maximum: 1000
minimum: 1
token-ratio:
description: Amount of tokens added on each successful request
type: number
maximum: 1
minimum: 0.001
required:
- enabled
- max-tokens
- token-ratio
Example:
Used by components::Redis.
Настройки отслеживания синхронизации реплик redis
Dynamic config that controls the monitoring settings for synchronizing replicas.
Dictionary keys can be either the database name (not the component name!) or __default__
. The latter configuration is applied for every non-matching Redis database/sentinel of the service.
type: object
additionalProperties:
$ref: '#/definitions/BaseSettings'
definitions:
BaseSettings:
type: object
additionalProperties: false
properties:
enable-monitoring:
description: set to `true` to turn on monitoring
type: boolean
forbid-requests-to-syncing-replicas:
description: set to true to forbid requests to syncing replicas
type: boolean
required:
- enable-monitoring
- forbid-requests-to-syncing-replicas
Used by components::Redis.
Example:
The same as REDIS_DEFAULT_COMMAND_CONTROL but for subscription clients.
type: object
additionalProperties: false
properties:
timeout_single_ms:
type: integer
minimum: 1
timeout_all_ms:
type: integer
minimum: 1
best_dc_count:
type: integer
minimum: 1
max_ping_latency_ms:
type: integer
minimum: 1
strategy:
type: string
enum:
- default
- every_dc
- local_dc_conductor
- nearest_server_ping
Example:
Used by components::Redis.
Dynamic config that controls the minimal interval between redis subscription clients rebalancing.
minimum: 0
type: integer
default: 30
Used by components::Redis.
Dynamic config that controls if services will wait for connections with redis instances.
type: object
additionalProperties: false
properties:
mode:
type: string
enum:
- no_wait
- master
- slave
- master_or_slave
- master_and_slave
throw_on_fail:
type: boolean
timeout-ms:
type: integer
minimum: 1
x-taxi-cpp-type: std::chrono::milliseconds
required:
- mode
- throw_on_fail
- timeout-ms
Example:
Used by components::Redis.
Cache update dynamic parameters.
schema:
type: object
additionalProperties:
type: object
additionalProperties: false
properties:
update-interval-ms:
type: integer
minimum: 1
update-jitter-ms:
type: integer
minimum: 0
full-update-interval-ms:
type: integer
minimum: 0
updates-enabled:
type: boolean
default: true
exception-interval-ms:
type: integer
minimum: 0
alert-on-failing-to-update-times:
type: integer
minimum: 0
required:
- update-interval-ms
- update-jitter-ms
- full-update-interval-ms
Example:
Used by all the caches derived from components::CachingComponentBase.
Controls whether the http request task should be cancelled when the deadline received from the client is reached.
schema:
type: boolean
Example:
Used by components::Server.
When false
, disables deadline propagation in the service. This includes:
schema:
type: boolean
Example:
Used by components::Server and ugrpc::server::ServerComponent.
Dynamic dump configuration. If the options are set for some dump then those options override the static configuration.
schema:
type: object
additionalProperties:
type: object
additionalProperties: false
properties:
dumps-enabled:
type: boolean
min-dump-interval:
description: dump interval in milliseconds
type: integer
minimum: 0
Example:
Used by dump::Dumper, especially by all the caches derived from components::CachingComponentBase.
Sets whether Stream API should be enabled for HTTP handlers.
schema:
type: boolean
Example:
Proxy for all the HTTP and HTTPS clients. Empty string disables proxy usage.
Proxy string may be prefixed with [scheme]://
to specify which kind of proxy is used. Schemes match the libcurl supported ones. A proxy host string can also embed user and password.
schema:
type: string
Example:
Used by components::HttpClient, affects the behavior of clients::http::Client and all the clients that use it.
Logging per line and file overrides. Log locations are defined as path prefix from the Arcadia root ("taxi/uservices/services/"). Location of file may be followed by :[line index]
to specify 1 exact log in that file.
default:
force-enabled: []
force-disabled: []
schema:
type: object
additionalProperties: false
required:
- force-enabled
- force-disabled
properties:
force-enabled:
type: array
description: Locations of logs to turn on. This option is deprecated, consider using "force-enabled-level" instead.
items:
type: string
force-disabled:
type: array
description: Locations of logs to turn off, logs with level WARNING and higher will not be affected.
This option is deprecated, consider using "force-disabled-level" instead.
items:
type: string
force-enabled-level:
type: object
description: |
Locations of logs to turn on with level equal or higher to given.
For example, to turn on all logs with level WARNING or higher in "userver/grpc",
all logs with level DEBUG or higher in file "userver/core/src/server/server.cpp"
and 1 log (since exact line is specified) with level TRACE in file "userver/core/src/server/http/http_request_parser.cpp":
"force-enabled-level": {
"taxi/uservices/userver/grpc": "WARNING",
"taxi/uservices/userver/core/src/server/server.cpp": "DEBUG",
"taxi/uservices/userver/core/src/server/http/http_request_parser.cpp:128": "TRACE"
}
additionalProperties:
type: string
force-disabled-level:
type: object
description: |
Locations of logs to turn off with level equal or lower to given.
For example, to turn off all logs with level ERROR or lower in "userver/grpc",
all logs with level INFO or lower in file "userver/core/src/server/server.cpp"
and 1 log (since exact line is specified) with level TRACE in file "userver/core/src/server/http/http_request_parser.cpp":
"force-disabled-level": {
"taxi/uservices/userver/grpc": "ERROR",
"taxi/uservices/userver/core/src/server/server.cpp": "INFO",
"taxi/uservices/userver/core/src/server/http/http_request_parser.cpp:128": "TRACE"
}
additionalProperties:
type: string
Used by components::LoggingConfigurator.
Controls HTTP requests and responses logging.
schema:
type: boolean
Example:
Used by components::Server.
Controls whether the logging of HTTP headers in handlers is performed.
schema:
type: boolean
Example:
Used by components::Server.
Dynamic config for controlling size and cache entry lifetime of the LRU based caches.
schema:
type: object
additionalProperties:
$ref: '#/definitions/CacheSettings'
definitions:
CacheSettings:
type: object
properties:
size:
type: integer
lifetime-ms:
type: integer
required:
- size
- lifetime-ms
additionalProperties: false
Example:
Used by all the caches derived from cache::LruCacheComponent.
Prefixes or full names of tracing::Span instances to not log.
schema:
type: object
additionalProperties: false
required:
- prefixes
- names
properties:
prefixes:
type: array
items:
type: string
names:
type: array
items:
type: string
Example:
Used by components::LoggingConfigurator and all the logging facilities.
Dynamic config for components::Server congestion control.
schema:
type: object
additionalProperties: false
properties:
min-limit:
type: integer
minimum: 1
description: |
Minimal RPS limit value.
up-rate-percent:
type: number
minimum: 0
exclusiveMinimum: true
description: |
On how many percents increase the RPS limit every second if not in overloaded state.
down-rate-percent:
type: number
minimum: 0
maximum: 100
exclusiveMinimum: true
description: |
On how many percents decrease the RPS limit every second if in overloaded state.
overload-on-seconds:
type: integer
minimum: 1
description: |
How many seconds overload should be higher than `up-level`,
to switch to overload state and start limiting RPS.
overload-off-seconds:
type: integer
minimum: 1
description: |
How many seconds overload should be higher than `down-level`,
to switch from overload state and the RPS limit start increasing.
up-level:
type: integer
minimum: 1
description: |
Overload level that should least for `overload-on-seconds` to switch to
overloaded state.
down-level:
type: integer
minimum: 1
description: |
Overload level that should least for `overload-on-seconds` to
increase RPS limits.
no-limit-seconds:
type: integer
minimum: 1
description: |
Seconds without overload to switch from overloaded state and
remove all the RPS limits.
load-limit-crit-percent:
type: integer
description: |
On reaching this load percent immediately switch to overloaded state.
Example:
Used by congestion_control::Component.
Controls whether congestion control limiting of RPS is performed (if main task processor is overloaded, then the server starts rejecting some requests).
schema:
type: boolean
Example:
Used by congestion_control::Component.
Dynamic config for profiling the coroutine based engine of userver. Dictionary key names are the names of engine::TaskProcessor.
schema:
type: object
properties: {}
additionalProperties:
$ref: '#/definitions/TaskProcessorSettings'
definitions:
TaskProcessorSettings:
type: object
required:
- enabled
- execution-slice-threshold-us
additionalProperties: false
properties:
enabled:
type: boolean
description: |
Set to `true` to turn on the profiling
execution-slice-threshold-us:
type: integer
description: |
Execution threshold of a coroutine on a thread without context switch.
If the threshold is reached then the coroutine is logged, otherwise
does nothing.
minimum: 1
Example:
Used by components::ManagerControllerComponent.
Controls engine::TaskProcessor quality of service dynamic config.
schema:
type: object
required:
- default-service
additionalProperties: false
properties:
default-service:
type: object
additionalProperties: false
required:
- default-task-processor
properties:
default-task-processor:
type: object
additionalProperties: false
required:
- wait_queue_overload
properties:
wait_queue_overload:
type: object
additionalProperties: false
required:
- time_limit_us
- length_limit
- action
properties:
time_limit_us:
type: integer
minimum: 0
description: |
Wait in queue time after which the `action is applied`.
length_limit:
type: integer
minimum: 0
description: |
Queue size after which the `action` is applied.
action
action:
type: string
enum:
- ignore
- cancel
description: |
Action to perform on tasks on queue overload.
`cancel` - cancels the tasks
sensor_time_limit_us:
type: integer
minimum: 0
description: |
Wait in queue time after which the overload events for
RPS congestion control are generated.
Example:
Used by components::ManagerControllerComponent.
Dynamic config for mapping extension files with HTTP header content type.
schema:
type: object
additionalProperties:
type: string
Example:
Used by server::handlers::HttpHandlerStatic