Welcome! Log In Create A New Profile

Advanced

Re: consistent hashing for upstreams

Alexandr Gomoliako
March 19, 2012 03:10PM
> We want to load-balance multiple static file servers behind nginx, and
> basing the upstream chosen on consistent hash will drastically increase
> the filesystem cache hit ratios the back-end servers, while preventing a
> "thundering herd" issue when one fails. Basically you get to use all of
> your RAM amongst the back ends for cache, rather than having the same
> objects in the cache of multiple back end servers.
>
> I thought of trying to use map directives and regexes to pick a back
> end, but handling weighting and failover makes this a complex and
> therefore brittle approach. Could consistent hashing for upstreams be
> achieved with embedded lua or perl?

Here's a simple approach on consistent hashing with embedded perl:
https://gist.github.com/2124034

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

consistent hashing for upstreams

rmalayter March 19, 2012 12:54PM

Re: consistent hashing for upstreams

Alexandr Gomoliako March 19, 2012 03:10PM

Re: consistent hashing for upstreams

rmalayter March 19, 2012 05:16PM

Re: consistent hashing for upstreams

Alexandr Gomoliako March 19, 2012 06:10PM

Re: consistent hashing for upstreams

Joshua Zhu March 19, 2012 09:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
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