swarm-victorialogs: size the agent-auth limit for a host booting its agents together
All agents on a host reach the gateway from one address and share one limit_req budget; a host boot is one cache miss per agent at once. Defaults go from 5r/s burst 20 to 50r/s burst 500. The module-eval case reads the option values.
This commit is contained in:
parent
8be4030d03
commit
bff605035c
3 changed files with 18 additions and 15 deletions
|
|
@ -157,7 +157,7 @@ in
|
|||
|
||||
options.services.hyperhive.deploy.victorialogs.authRate = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "5r/s";
|
||||
default = "50r/s";
|
||||
example = "30r/m";
|
||||
description = ''
|
||||
nginx `limit_req` rate, per client address, of `/select/logsql/`
|
||||
|
|
@ -166,15 +166,17 @@ in
|
|||
within {option}`services.hyperhive.deploy.victorialogs.authVerdictTtl`
|
||||
costs a secret store login and read, whether the bearer is right or not.
|
||||
|
||||
Counts every agent query, granted or not, so it is sized for the agents
|
||||
that share one address querying at once, not for one agent. Requests
|
||||
over the rate and its burst are answered 403.
|
||||
Counts every agent query, granted or not, and is keyed by client address,
|
||||
so every agent on one host shares one budget. The default covers about a
|
||||
hundred agents on a host cold-starting at once, each costing one store
|
||||
login and read for its first query. Requests over the rate and its burst
|
||||
are answered 403.
|
||||
'';
|
||||
};
|
||||
|
||||
options.services.hyperhive.deploy.victorialogs.authBurst = lib.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 20;
|
||||
default = 500;
|
||||
description = ''
|
||||
Requests a client address may make above
|
||||
{option}`services.hyperhive.deploy.victorialogs.authRate` before nginx
|
||||
|
|
|
|||
Loading…
Reference in a new issue