Load balancer for URL-hash based balancing

load balancing

What is an open source load balancer that allows for hash based balancing? I would like to do hash based load balancing of a URL but first remove the user specific arguments from the URL. Basically want to increase Varnish's cache performance by adding URL to node persistence.

Example: example.com/foo/usertoken/bar

Where the hash would be based on: example.com/foo/bar.

  • Edited for clarity, bias, and URL modification. *

Best Answer

"Best" is in the eye of the beholder, so this answer is only an approximation.

HAProxy is great if:

  • You need the highest possible per-machine load balancer performance.
  • You don't need SSL termination on the load balancer.
  • You value reliability and version stability highly.

nginx is great if:

  • You want more pre- and post-processing of the HTTP stream on the load balancer, such as GZip compression or SSL termination.
  • You value connection buffering, where the load balancer will buffer content between the clients and the backend servers (useful for some 'scripting language' backends which have a high connection overhead).