bc_glitches integer
bc_http_major integer
bc_nb_streams integer
+bc_reused boolean
bc_src ip
bc_src_port integer
bc_srv_queue integer
bc_nb_streams : integer
Returns the number of streams opened on the backend connection.
+bc_reused : boolean
+ Returns true if the transfer was performed via a reused backend connection.
+
bc_src : ip
This is the source ip address of the connection on the server side, which is
the server address HAProxy connected from. It is of type IP and works on both
return 1;
}
+/* return a valid test if the current request was performed using connection reuse */
+static int smp_fetch_reused(const struct arg *args, struct sample *smp, const char *kw, void *private)
+{
+ if (!smp->strm)
+ return 0;
+
+ smp->data.type = SMP_T_BOOL;
+ smp->data.u.sint = !!(smp->strm->flags & SF_SRV_REUSED);
+ return 1;
+}
+
/* fetch the connection's destination IPv4/IPv6 address. Depending on the
* keyword, it may be the frontend or the backend connection.
*/
{ "bc_dst_port", smp_fetch_dport, 0, NULL, SMP_T_SINT, SMP_USE_L4SRV },
{ "bc_src", smp_fetch_src, 0, NULL, SMP_T_ADDR, SMP_USE_L4SRV },
{ "bc_src_port", smp_fetch_sport, 0, NULL, SMP_T_SINT, SMP_USE_L4SRV },
+ { "bc_reused", smp_fetch_reused, 0, NULL, SMP_T_BOOL, SMP_USE_L4SRV },
{ "dst", smp_fetch_dst, 0, NULL, SMP_T_ADDR, SMP_USE_L4CLI },
{ "dst_is_local", smp_fetch_dst_is_local, 0, NULL, SMP_T_BOOL, SMP_USE_L4CLI },