Upstream performances: what if one node only ?
Maxim Dounin
mdounin at mdounin.ru
Fri Jun 27 16:35:02 UTC 2014
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
> 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 ?
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/
More information about the nginx
mailing list