Load balancing based on hash of the domain

Francis Daly francis at daoine.org
Tue Dec 15 11:23:43 UTC 2015


On Tue, Dec 15, 2015 at 11:56:43AM +0100, Bram wrote:

Hi there,

> Problem is that it will not accept anything besides $remote_addr and $request_uri.
> For example:
> 
>     upstream loadbalancer {
>         hash $server_name consistent:

Use ; not :

>         #hash $request_uri consistent;
>         server 10.0.0.1:8080;

Line 6 is probably that one, because that is where the "hash" directive
terminates.

>         server 10.0.0.2:8080;
>     }
> 
> Will fail with:
> 
> invalid number of arguments in "hash" directive in /etc/nginx/nginx-loadbalancing.conf:6

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list