bouncer/config/sys.config
Andrew Mayorov 9004e3fe50
Implement a thrift service around opa policy solver (#1)
Co-authored-by: Andrey Fadeev <me@ciiol.net>
2020-10-14 12:09:26 +03:00

93 lines
2.8 KiB
Plaintext

[
{bouncer, [
{ip, "::"},
{port, 8022},
{services, #{
arbiter => #{
path => <<"/v1/arbiter">>
}
}},
{protocol_opts, #{
% How much to wait for another request before closing a keepalive connection? (ms)
request_timeout => 5000
}},
{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},
{opa, #{
endpoint => {"opa", 8181},
% Which transport to use? (tcp | tls)
transport => tcp,
% Which `gen_tcp:connect_option()`s to use? Relevant only for `tcp` transport.
tcp_opts => [inet6],
% Which `ssl:tls_client_option()`s to use? Relevant only for `tls` transport.
tls_opts => [{verify, verify_peer}],
% Total timeout for estabilishing a connection. (ms)
connect_timeout => 1000,
% Timeout for domain lookup query. (ms)
domain_lookup_timeout => 1000,
% Timeout for making request and receiving response. (ms)
request_timeout => 1000
}},
{woody_event_handlers, [
hay_woody_event_handler,
{scoper_woody_event_handler, #{
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 , [<<"bouncer">>]}
}}
]},
{kernel, [
{logger_level, debug},
{logger, [
{handler, default, logger_std_h, #{
config => #{
type => {file, "/var/log/bouncer/log.json"}
},
formatter => {logger_logstash_formatter, #{}}
}}
]}
]},
% {how_are_you, [
% {metrics_publishers, [
% {hay_statsd_publisher, #{
% key_prefix => <<"bender.">>,
% host => "localhost",
% port => 8125
% }}
% ]}
% ]},
{scoper, [
{storage, scoper_storage_logger}
]},
{snowflake, [
{max_backward_clock_moving, 1000} % 1 second
% {machine_id, hostname_hash}
]}
].