Welcome! Log In Create A New Profile

Advanced

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

June 02, 2013 08:48AM
Thanks for your response.


I've tried to dynamicly find upstream block name. However, now my backend ips are stored in some storage like REDIS, or memcache. In each request, I first to get the ips from the storage, then proxy the request to the backend. Some backends have not only one ip, so I used the usptream to process the innormal situation like 502 in someone of them. Main objective is to retry another backend ip instead of load balance.


Sorry for my english.


At 2013-06-02 19:33:34,"Maxim Dounin" <mdounin@mdounin.ru> wrote:
>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
_______________________________________________
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 464 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: 115
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