Welcome! Log In Create A New Profile

Advanced

Re: Upstream: Count peer->fails if peers->single is 1

Maxim Dounin
March 08, 2023 05:58PM
Hello!

On Wed, Mar 08, 2023 at 09:11:01AM +0900, u5h wrote:

> Hello.
> The upstream peer status is always up when the upstream peer is single.
> FYI: https://github.com/vozlt/nginx-module-vts/issues/262
> The conventional upstream round robin hasn't count peer->fails anywhere
> when it is peers->single is 1.
> Thus we’d like to only count it, but not to judge that the peer is down.

As per nginx usage of upstreams with a single peer, such peers are
never considered unavailable, and to do this failures are never
counted (or, which is equivalent, immediately forgotten).

If you are trying to show status of a peer as seen by nginx, then
"up" is perfectly correct for such peers. If you are instead
trying to show some abstract state based on request failures, then
looking into the peer's data feels wrong to me: rather, you should
look into request results (and/or upstream states), and collect
relevant stats yourself.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Upstream: Count peer->fails if peers->single is 1

u5h 414 March 07, 2023 07:12PM

Re: Upstream: Count peer->fails if peers->single is 1

Maxim Dounin 150 March 08, 2023 05:58PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready