acl X (!) X X X
backlog X X X -
balance X - X X
+be-unpublished - - X X
bind - X X -
capture cookie - X X -
capture request header - X X -
See also : "cookie", "hash-type".
+be-unpublished
+ Instructs the backend to start in the unpublished state.
+
+ May be used in the following contexts: tcp, http, log
+
+ May be used in sections : defaults | frontend | listen | backend
+ no | no | yes | yes
+
+ In effect, any use_backend and default_backend rules from another proxy which
+ reference the current proxy are ignored and the next content switching rules
+ are evaluated. This can be bypassed though via a "force-be-switch" rule.
+
+ This state is similar to the disabled one but with some differences. First,
+ an unpublished backend will still be fully initialized, including the server
+ health checks which remain active. Finally, a backend can be publicly exposed
+ via the command "publish backend" on the CLI. See the management manual.
+
+ See also : "force-be-switch"
+
+
bind [<address>]:<port_range> [, ...] [param*]
bind /<path> [, ...] [param*]
Define one or several listening addresses and/or ports in a frontend.
May be used in sections: defaults | frontend | listen | backend
no | yes | yes | no
- See also : "disabled"
+ See also : "be-unpublished", "disabled"
filter <name> [param*]
backend be2
http-request return status 200 hdr "x-be" %[be_name]
+ backend be_unpublished
+ be-unpublished
+ http-request return status 200 hdr "x-be" %[be_name]
+
backend be_disabled
disabled
http-request return status 200 hdr "x-be" %[be_name]
expect resp.status == 200
expect resp.http.x-be == "be_default"
+ # Static rule on unpublished backend -> continue to next rule
+ txreq -hdr "x-target: be_unpublished"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.x-be == "be"
+
# Static rule on disabled backend -> continue to next rule
txreq -hdr "x-target: be_disabled"
rxresp
}
#endif
+/* Parser for "be-unpublished" proxy keyword. */
+static int proxy_parse_be_unpublished(char **args, int section_type, struct proxy *curpx,
+ const struct proxy *defpx, const char *file, int line,
+ char **err)
+{
+ if (curpx->cap & PR_CAP_DEF) {
+ memprintf(err, "'%s' not allowed in 'defaults' section.", args[0]);
+ goto err;
+ }
+
+ if (!(curpx->cap & PR_CAP_BE)) {
+ memprintf(err, "'%s' only available in backend or listen section.", args[0]);
+ goto err;
+ }
+
+ curpx->flags |= PR_FL_BE_UNPUBLISHED;
+
+ return 0;
+
+ err:
+ return -1;
+}
+
static int proxy_parse_force_be_switch(char **args, int section_type, struct proxy *curpx,
const struct proxy *defpx, const char *file, int line,
char **err)
{ CFG_LISTEN, "clitcpka-intvl", proxy_parse_tcpka_intvl },
{ CFG_LISTEN, "srvtcpka-intvl", proxy_parse_tcpka_intvl },
#endif
+ { CFG_LISTEN, "be-unpublished", proxy_parse_be_unpublished },
{ CFG_LISTEN, "force-be-switch", proxy_parse_force_be_switch },
{ CFG_LISTEN, "guid", proxy_parse_guid },
{ 0, NULL, NULL },