Forum: NGINX Upstream performances: what if one node only ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fcee1302b5ee71f5aaef89eb67554cac?d=identicon&s=25 Nicolas Flinois (Guest)
on 2014-06-27 15:54
(Received via mailing list)
Hi all,

I am wondering about the possible extra-cost of using a single-node
upstream into proxy_pass compared with  'proxy_pass host' directly.
I need to automate application servers move, and find convenient to
update
upstream definitions only (defined into dedicated files).

Solution1:

upstream upOne {
    server somehost;
}
[..]
proxy_pass upOne;


Solution2:

proxy_pass somehost;

Is solution1 more time-consuming than solution2 at run-time ?

Many thanks for your advises !


Regards,

Nicolas FLINOIS
ALTEN Contracting Company
Amadeus, Sales & e-Commerce Platform
T: + 33 (0) 4 92 94 63 50 (Ext:6350)
nicolas.flinois@amadeus.com
www.amadeus.com/
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-06-27 18:35
(Received via mailing list)
Hello!

On Fri, Jun 27, 2014 at 03:53:24PM +0200, Nicolas Flinois wrote:

>     server somehost;
> }
> [..]
> proxy_pass upOne;
>
>
> Solution2:
>
> proxy_pass somehost;
>
> Is solution1 more time-consuming than solution2 at run-time ?

There is no difference.  Internally, proxy_pass with a hostname
creates an implicit upstream{} with a single server, and uses it.

--
Maxim Dounin
http://nginx.org/
Fcee1302b5ee71f5aaef89eb67554cac?d=identicon&s=25 Nicolas Flinois (Guest)
on 2014-06-27 18:40
(Received via mailing list)
Many thanks Maxim.

Have a nice week-end..

Nicolas FLINOIS
ALTEN Contracting Company
Amadeus, Sales & e-Commerce Platform
T: + 33 (0) 4 92 94 63 50 (Ext:6350)
nicolas.flinois@amadeus.com
www.amadeus.com/



From:   Maxim Dounin <mdounin@mdounin.ru>
To:     nginx@nginx.org,
Date:   27/06/2014 18:35
Subject:        Re: Upstream performances: what if one node only ?
Sent by:        nginx-bounces@nginx.org



Hello!

On Fri, Jun 27, 2014 at 03:53:24PM +0200, Nicolas Flinois wrote:

> Hi all,
>
> I am wondering about the possible extra-cost of using a single-node
> upstream into proxy_pass compared with  'proxy_pass host' directly.
> I need to automate application servers move, and find convenient to
update
>
> Solution2:
>
> proxy_pass somehost;
>
> Is solution1 more time-consuming than solution2 at run-time ?

There is no difference.  Internally, proxy_pass with a hostname
creates an implicit upstream{} with a single server, and uses it.

--
Maxim Dounin
http://nginx.org/
This topic is locked and can not be replied to.