[STATS] separate frontend and backend HTTP stats
It is wrong to merge FE and BE stats for a proxy because when we consult a
BE's stats, it reflects the FE's stats eventhough the BE has received no
traffic. The most common example happens with listen instances, where the
backend gets credited for all the trafic even when a use_backend rule makes
use of another backend.
diff --git a/src/session.c b/src/session.c
index c05cc8b..91edd73 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1575,11 +1575,11 @@
n = 0;
if (s->fe->mode == PR_MODE_HTTP)
- s->fe->counters.p.http.rsp[n]++;
+ s->fe->counters.fe.http.rsp[n]++;
- if ((s->flags & SN_BE_ASSIGNED) && (s->fe != s->be) &&
+ if ((s->flags & SN_BE_ASSIGNED) &&
(s->be->mode == PR_MODE_HTTP))
- s->be->counters.p.http.rsp[n]++;
+ s->be->counters.be.http.rsp[n]++;
}
/* let's do a final log if we need it */