Welcome! Log In Create A New Profile

Advanced

Re: 100% with upstream / backup server

All files from this thread

File Name File Size   Posted by Date  
ngx_round_robin_fix.patch 555 bytes open | download Piotr Sikora 01/26/2010 Read message
ngx_round_robin_fix_v2.patch 551 bytes open | download Piotr Sikora 01/26/2010 Read message
Maxim Dounin
January 26, 2010 12:18PM
Hello!

On Tue, Jan 26, 2010 at 05:58:46PM +0100, Piotr Sikora wrote:

> >I such a setup not allowed?
>
> This is a bug, I sent patch for this (attached) few weeks ago, but
> it didn't make it into nginx-0.8.32.

[...]

> --- src/http/ngx_http_upstream_round_robin.c.orig Mon Jan 4 05:14:43 2010
> +++ src/http/ngx_http_upstream_round_robin.c Mon Jan 4 05:14:50 2010
> @@ -403,6 +403,16 @@
>
> /* there are several peers */
>
> + for (i = 0; i < rrp->peers->number; i++) {
> + if (!rrp->peers->peer[i].down) {
> + break;
> + }
> + }
> +
> + if (i == rrp->peers->number) {
> + return NGX_BUSY;
> + }
> +
> if (pc->tries == rrp->peers->number) {
>
> /* it's a first try - get a current peer */

This patch has at least two problems I see right now:

1. It doesn't handle backup peers.

2. It does extra unneeded work on each request.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

100% with upstream / backup server

Matthias Rieber January 26, 2010 11:44AM

Re: 100% with upstream / backup server Attachments

Piotr Sikora January 26, 2010 12:02PM

Re: 100% with upstream / backup server

Maxim Dounin January 26, 2010 12:18PM

Re: 100% with upstream / backup server Attachments

Piotr Sikora January 26, 2010 12:36PM

Re: 100% with upstream / backup server

Maxim Dounin January 26, 2010 02:02PM

Re: 100% with upstream / backup server

Matthias Rieber January 26, 2010 04:22PM

Re: 100% with upstream / backup server

Maxim Dounin January 26, 2010 12:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
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