- tune.ssl.default-dh-param
- tune.ssl.ssl-ctx-cache-size
- tune.vars.global-max-size
+ - tune.vars.proc-max-size
- tune.vars.reqres-max-size
- tune.vars.sess-max-size
- tune.vars.txn-max-size
1000 entries.
tune.vars.global-max-size <size>
+tune.vars.proc-max-size <size>
tune.vars.reqres-max-size <size>
tune.vars.sess-max-size <size>
tune.vars.txn-max-size <size>
- These four tunes help to manage the maximum amount of memory used by the
- variables system. "global" limits the overall amount of memory available
- for all scopes. "sess" limits the memory for the session scope, "txn" for
- the transaction scope, and "reqres" limits the memory for each request or
- response processing.
- Memory accounting is hierarchical, meaning more coarse grained limits
- include the finer grained ones: "sess" includes "txn", and "txn" includes
- "reqres".
+ These five tunes help to manage the maximum amount of memory used by the
+ variables system. "global" limits the overall amount of memory available for
+ all scopes. "proc" limits the memory for the process scope, "sess" limits the
+ memory for the session scope, "txn" for the transaction scope, and "reqres"
+ limits the memory for each request or response processing.
+ Memory accounting is hierarchical, meaning more coarse grained limits include
+ the finer grained ones: "proc" includes "sess", "sess" includes "txn", and
+ "txn" includes "reqres".
For example, when "tune.vars.sess-max-size" is limited to 100,
"tune.vars.txn-max-size" and "tune.vars.reqres-max-size" cannot exceed
<var-name> The name of the variable starts with an indication about
its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction
(request and response)
<var-name> The name of the variable starts with an indication about
its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction
(request and response)
<var-name> The name of the variable starts with an indication about
its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction
(request and response)
<var-name> The name of the variable starts with an indication about
its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction
(request and response)
result as a signed integer. <value> can be a numeric value or a variable
name. The name of the variable starts with an indication about its scope. The
scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and response)
"req" : the variable is shared only during request processing
integer, and returns the result as an signed integer. <value> can be a
numeric value or a variable name. The name of the variable starts with an
indication about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and response)
"req" : the variable is shared only during request processing
integer is returned (typically 2^63-1). <value> can be a numeric value or a
variable name. The name of the variable starts with an indication about its
scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and response)
"req" : the variable is shared only during request processing
remainder as an signed integer. If <value> is null, then zero is returned.
<value> can be a numeric value or a variable name. The name of the variable
starts with an indication about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and response)
"req" : the variable is shared only during request processing
value for the sign is returned so that the operation doesn't wrap around.
<value> can be a numeric value or a variable name. The name of the variable
starts with an indication about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and response)
"req" : the variable is shared only during request processing
integer, and returns the result as an signed integer. <value> can be a
numeric value or a variable name. The name of the variable starts with an
indication about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and response)
"req" : the variable is shared only during request processing
Sets a variable with the input content and returns the content on the output as
is. The variable keeps the value and the associated input type. The name of the
variable starts with an indication about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and
response),
a constant, simply perform a "neg,add(value)". <value> can be a numeric value
or a variable name. The name of the variable starts with an indication about
its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and
response),
of type signed integer, and returns the result as an signed integer.
<value> can be a numeric value or a variable name. The name of the variable
starts with an indication about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and
response),
Returns a variable with the stored type. If the variable is not set, the
sample fetch fails. The name of the variable starts with an indication
about its scope. The scopes allowed are:
+ "proc" : the variable is shared with the whole process
"sess" : the variable is shared with the whole session
"txn" : the variable is shared with the transaction (request and
response),
/* This array of int contains the system limits per context. */
static unsigned int var_global_limit = 0;
static unsigned int var_global_size = 0;
+static unsigned int var_proc_limit = 0;
static unsigned int var_sess_limit = 0;
static unsigned int var_txn_limit = 0;
static unsigned int var_reqres_limit = 0;
/* fall through */
case SCOPE_SESS:
sess->vars.size += size;
- var_global_size += size;
+ /* fall through */
+ case SCOPE_PROC:
+ global.vars.size += size;
+ var_global_size += size;
}
}
case SCOPE_SESS:
if (var_sess_limit && sess->vars.size + size > var_sess_limit)
return 0;
+ /* fall through */
+ case SCOPE_PROC:
+ if (var_proc_limit && global.vars.size + size > var_proc_limit)
+ return 0;
if (var_global_limit && var_global_size + size > var_global_limit)
return 0;
}
pool_free2(var_pool, var);
size += sizeof(struct var);
}
- vars->size -= size;
- var_global_size -= size;
+ vars->size -= size;
+ global.vars.size -= size;
+ var_global_size -= size;
}
/* This function init a list of variabes. */
}
/* Check scope. */
- if (len > 5 && strncmp(name, "sess.", 5) == 0) {
+ if (len > 5 && strncmp(name, "proc.", 5) == 0) {
+ name += 5;
+ len -= 5;
+ *scope = SCOPE_PROC;
+ }
+ else if (len > 5 && strncmp(name, "sess.", 5) == 0) {
name += 5;
len -= 5;
*scope = SCOPE_SESS;
}
else {
memprintf(err, "invalid variable name '%s'. A variable name must be start by its scope. "
- "The scope can be 'sess', 'txn', 'req' or 'res'", name);
+ "The scope can be 'proc', 'sess', 'txn', 'req' or 'res'", name);
return NULL;
}
/* Check the availibity of the variable. */
switch (var_desc->scope) {
+ case SCOPE_PROC:
+ vars = &global.vars;
+ break;
case SCOPE_SESS:
vars = &smp->sess->vars;
break;
struct vars *vars;
switch (scope) {
+ case SCOPE_PROC: vars = &global.vars; break;
case SCOPE_SESS: vars = &smp->sess->vars; break;
case SCOPE_TXN: vars = &smp->strm->vars_txn; break;
case SCOPE_REQ:
/* Select "vars" pool according with the scope. */
switch (scope) {
+ case SCOPE_PROC: vars = &global.vars; break;
case SCOPE_SESS: vars = &smp->sess->vars; break;
case SCOPE_TXN: vars = &smp->strm->vars_txn; break;
case SCOPE_REQ:
/* Select "vars" pool according with the scope. */
switch (var_desc->scope) {
+ case SCOPE_PROC: vars = &global.vars; break;
case SCOPE_SESS: vars = &smp->sess->vars; break;
case SCOPE_TXN: vars = &smp->strm->vars_txn; break;
case SCOPE_REQ:
return vars_max_size(args, section_type, curpx, defpx, file, line, err, &var_global_limit);
}
+static int vars_max_size_proc(char **args, int section_type, struct proxy *curpx,
+ struct proxy *defpx, const char *file, int line,
+ char **err)
+{
+ return vars_max_size(args, section_type, curpx, defpx, file, line, err, &var_proc_limit);
+}
+
static int vars_max_size_sess(char **args, int section_type, struct proxy *curpx,
struct proxy *defpx, const char *file, int line,
char **err)
static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, {
- { "var", smp_fetch_var, ARG1(1,STR), smp_check_var, SMP_T_STR, SMP_USE_L5CLI },
+ { "var", smp_fetch_var, ARG1(1,STR), smp_check_var, SMP_T_STR, SMP_USE_L4CLI },
{ /* END */ },
}};
static struct cfg_kw_list cfg_kws = {{ },{
{ CFG_GLOBAL, "tune.vars.global-max-size", vars_max_size_global },
+ { CFG_GLOBAL, "tune.vars.proc-max-size", vars_max_size_proc },
{ CFG_GLOBAL, "tune.vars.sess-max-size", vars_max_size_sess },
{ CFG_GLOBAL, "tune.vars.txn-max-size", vars_max_size_txn },
{ CFG_GLOBAL, "tune.vars.reqres-max-size", vars_max_size_reqres },