Welcome! Log In Create A New Profile

Advanced

Re: AB testing with nginx

Maxim Dounin
November 03, 2009 06:22AM
Hello!

On Tue, Nov 03, 2009 at 05:17:57AM -0500, dawe7 wrote:

> Thanks, but here is one problem:
>
> If I have 3 servers (or more) in upstream, I split traffic to 33%, 33%, 33%. No 50% and 50%.
>
> And second problem is If I use servers with different performance. I may overload one of this server.
> Because I can not combine ip_hash and weight methods for connection distribution and set one server weight=2 and others servers weight=1.
> And split traffic to 50%,25%+25%.

Well, if you need more generic aproach you may rewrite requests
to another location and handle them differently. Try something
like this:

location / {
if ($remote_addr ~ "[02468]$") {
rewrite ^(.*) /test/$1 last;
}

proxy_pass http://normal_backend/;
}

location /test/ {
internal;
proxy_pass http://test_backend/;
}

Maxim Dounin
Subject Author Posted

AB testing with nginx

dawe7 November 03, 2009 04:27AM

Re: AB testing with nginx

Maxim Dounin November 03, 2009 04:46AM

Re: AB testing with nginx

dawe7 November 03, 2009 05:17AM

Re: AB testing with nginx

Maxim Dounin November 03, 2009 06:22AM

Re: AB testing with nginx

Valery Kholodkov November 03, 2009 06:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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