limiter/config/sys.config
Aleksey Kashapov 3eff7ddf1e
VEN-9: Adds support for versioned limit config object (#20)
* Adds explicit damsel dependency

* Bump dominant docker compose image (sha-e0afa44)

* Adds dominant-sourced config unmarshalling

* Adds operation `Limiter:GetVersioned/4`

* Refactor test suite and add testcase group with dominant-sourced config object use
2023-03-01 18:33:36 +03:00

130 lines
3.7 KiB
Plaintext

[
{limiter, [
{ip, "::"},
{port, 8022},
{services, #{
limiter => #{
path => <<"/v1/limiter">>
},
configurator => #{
path => <<"/v1/configurator">>
}
}},
{service_clients, #{
accounter => #{
url => <<"http://shumway:8022/accounter">>
},
automaton => #{
url => <<"http://machinegun:8022/v1/automaton">>
},
xrates => #{
url => <<"http://xrates:8022/xrates">>
}
}},
% Enables currency conversion for turnover metric (default = disabled)
{currency_conversion, disabled},
{exchange_factors, #{
<<"DEFAULT">> => {1, 1},
<<"USD">> => {105, 100},
<<"EUR">> => {12, 10}
}},
{protocol_opts, #{
% How much to wait for another request before closing a keepalive connection? (ms)
request_timeout => 5000,
% Should be greater than any other timeouts
idle_timeout => infinity
}},
{transport_opts, #{
% Maximum number of simultaneous connections. (default = 1024)
max_connections => 8000,
% Size of the acceptor pool. (default = 10)
num_acceptors => 100
}},
% How much to wait for outstanding requests completion when asked to shut down? (ms)
{shutdown_timeout, 1000},
{woody_event_handlers, [
{scoper_woody_event_handler, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000,
max_printable_string_length => 80
}
}
}}
]},
{scoper_event_handler_options, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000,
max_printable_string_length => 80
}
}
}},
{health_check, #{
% disk => {erl_health, disk , ["/", 99]},
% memory => {erl_health, cg_memory, [99]},
% service => {erl_health, service , [<<"limiter">>]}
}}
]},
{dmt_client, [
% milliseconds
{cache_update_interval, 5000},
{max_cache_size, #{
elements => 20,
% 50Mb
memory => 52428800
}},
{woody_event_handlers, [
{scoper_woody_event_handler, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
}
}}
]},
{service_urls, #{
'Repository' => <<"http://dominant:8022/v1/domain/repository">>,
'RepositoryClient' => <<"http://dominant:8022/v1/domain/repository_client">>
}}
]},
{kernel, [
{logger_sasl_compatible, false},
{logger_level, debug},
{logger, [
{handler, default, logger_std_h, #{
level => error,
config => #{type => standard_error},
formatter => {logger_formatter, #{depth => 30}}
}},
{handler, console, logger_std_h, #{
config => #{
type => {file, "/var/log/limiter/log.json"}
},
formatter => {logger_logstash_formatter, #{}}
}}
]}
]},
{os_mon, [
% for better compatibility with busybox coreutils
{disksup_posix_only, true}
]},
{scoper, [
{storage, scoper_storage_logger}
]},
{prometheus, [
{collectors, [default]}
]}
].