Welcome! Log In Create A New Profile

Advanced

Re: [PATCH]upstream server directive support variable

Maxim Dounin
June 02, 2013 07:34AM
Hello!

On Sun, Jun 02, 2013 at 09:34:58AM +0800, flygoast wrote:

> Hi, guys
>
>
> In my business, I need dynamicly to find the backend ip address
> according to the request. However, I also want to use the
> upstream to take advantage of load balance. So I add the
> variable support in server directive. For sake of avoiding
> blocking the whole worker due to resolving domain, at present,
> only dotted decimal IP address should be parsed in
> the variables. Anyone can help to check or improve it? Thanks.

Load balancing requires a state for a group of servers to be kept
between requests. This somewhat contradicts an idea of
dynamically finding a backend's ip address for each request -
instead of balancing backends the code will balance backend
"placeholders".

Have you tried dynamically finding an upstream{} block name
instead, and configuring appropriate upstream{} blocks? This is
available out of the box.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

[PATCH]upstream server directive support variable Attachments

flygoast 1145 June 01, 2013 09:38PM

Re: [PATCH]upstream server directive support variable

Maxim Dounin 462 June 02, 2013 07:34AM

Re:Re: [PATCH]upstream server directive support variable

flygoast 515 June 02, 2013 08:48AM

Re: Re: [PATCH]upstream server directive support variable

Maxim Dounin 465 June 02, 2013 12:24PM



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

Online Users

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