Usage of InFlightReq

Hello folks,
I have got 2 questions about the InFlighReq middleware which I could not answer myself from the docs.

Q1/
Which object is the counter linked to or instantiated by: the router, the middleware or the service?
The doc says you can limit the requests going to a service, but that could be indirect by limiting the routers or middlewares before the service.

Scenario 1: assume you have 2 routers RA and RB attached to one commonly used InFlightReq middleware M and one commonly used service S.
Are there 2 separate counters for simultaneous requests or just 1 ?

Scenario 2: assume you have 2 routers RA and RB where RA is attached to InFlightReq middleware M A and RB attached to another middleware MB, and both routers attached to one commonly used service S.
Are there 2 separate counters for simultaneous requests or just 1 ?

Scenario 3: assume you have 2 routers RA and RB to one commonly used InFlightReq middleware M and 2 services SA and SB, where router RA is attached to service SA and RB to SB.
Are there 2 separate counters for simultaneous requests or just 1 ?

Q2/
How can I in some way disable the source criterion, so that all requests are counted by as coming from one undistinguished source ?
I'm now trying to (mis)use a headername which comes with only one never changing value. But here I would rely on an instable condition, because I do not actively control this header.

Thanks for short clarification.

Welcome to the community @bluebird

Q2. Don't set a sourceCriterion.

SourceCriterion defines what criterion is used to group requests as originating from a common source. The precedence order is ipStrategy , then requestHeaderName , then requestHost . If none are set, the default is to use the requestHost .

For Q1 I want to say that it is counted from the router/middleware to all backends. But I haven't confirmed this empirically or by investigating the code. I have only used it with a single backend.

Thanks for responding.

Q1: if it counts on the router, the documentation could be clearer, where it now says: "prevent services from being overwhelmed with high load". Here services probably not exactly relates to "service" as in terms of configuration.

Q2: According to the docs, not setting the source criterion would default to the requestHost, thus having a separate counter for each domain name in pointing to the router in a multi-domain environment. So still not a "collect them all".