limiter/config/sys.config

104 lines
3.0 KiB
Plaintext
Raw Normal View History

2021-02-17 09:47:57 +00:00
[
{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">>
2021-02-17 09:47:57 +00:00
}
}},
{exchange_factors, #{
<<"DEFAULT">> => {1, 1},
<<"USD">> => {105, 100},
<<"EUR">> => {12, 10}
}},
2021-02-17 09:47:57 +00:00
{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
}
}
}},
2021-02-17 09:47:57 +00:00
{health_check, #{
% disk => {erl_health, disk , ["/", 99]},
% memory => {erl_health, cg_memory, [99]},
% service => {erl_health, service , [<<"limiter">>]}
}}
]},
{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}}
2021-02-17 09:47:57 +00:00
}},
{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]}
]}
].