using the upstream_hash_module and handling changes when adding new servers
Larry Bates
larry.bates at vitalesafe.com
Tue Apr 7 20:17:36 MSD 2009
I do something like this but solved it a completely different way. I put
storage behind the balanced servers and shared it among them using NFS. That
way every server sees a consistent set of files. Otherwise users get "nailed"
to a server and that sort of defeats the purpose of load balancing. Hope this
helps.
-Larry
-----Original Message-----
From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of
jackdempsey
Sent: Tuesday, April 07, 2009 10:44 AM
To: nginx at sysoev.ru
Subject: using the upstream_hash_module and handling changes when adding new
servers
Hi all,
I'm looking to use the hash module to split out many files across several
servers. I've done some testing, and can confirm the obvious fact that when you
add a new server, some of the files that used to be found at server1 are now
looked for at the new server. One way to handle this would be to copy all of the
files from all servers to the new server. I'd like to avoid this though, and
only have files on the boxes where they're needed.
So, I've looked at the module a bit in the hopes of extracting the logic and
basically allowing myself to say for a file named "foo.html", the hash module
will direct me to serverX. Has anyone does this before? I would imagine this
would be useful to others as well. Going to jump back into the code and trace
through it some more; if anyone has experience in this area, I'd be curious to
see how you handled things.
Thanks much,
Jack
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,884,884#msg-884
More information about the nginx
mailing list