Persistence + Round robin

Jeffrey 'jf' Lim jfs.world at gmail.com
Thu Sep 25 11:56:36 MSD 2008


On Thu, Sep 25, 2008 at 3:46 PM, Grzegorz Nosek
<grzegorz.nosek at gmail.com> wrote:
>
> I think you might be able to do something like this without writing new
> code. How about (not tried, just thinking):
>
> upstream up_default {
>        # sublimUSE UPSTREAM_FAIRinal message :)
>        server 10.0.0.1:80;
>        server 10.0.0.2:80;
>        server 10.0.0.3:80;
> }
>
> upstream up_1 { server 10.0.0.1:80; }
> upstream up_2 { server 10.0.0.2:80; }
> upstream up_3 { server 10.0.0.3:80; }
>
> location / {
>        if (...something...) {
>                proxy_pass http://up_1;
>        }
>        if (...) {
>                proxy_pass http://up_2;
>        }
>        if (...) {
>                proxy_pass http://up_3;
>        }
>        proxy_pass http://up_default;
> }
>

uh... right - that's the magical "something" there... ;)

-jf

--
In the meantime, here is your PSA:
"It's so hard to write a graphics driver that open-sourcing it would not help."
 -- Andrew Fear, Software Product Manager, NVIDIA Corporation
http://kerneltrap.org/node/7228





More information about the nginx mailing list