Upstream performances: what if one node only?

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)
[email protected]
www.amadeus.com/

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 D.
http://nginx.org/

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)
[email protected]
www.amadeus.com/

From: Maxim D. [email protected]
To: [email protected],
Date: 27/06/2014 18:35
Subject: Re: Upstream performances: what if one node only ?
Sent by: [email protected]

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 D.
http://nginx.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs