[Varnish] #1854: Feature request: leastconn director

Varnish varnish-bugs at varnish-cache.org
Fri Feb 5 01:15:41 CET 2016

#1854: Feature request: leastconn director
 Reporter:  BenMorel   |       Type:  enhancement
   Status:  new        |   Priority:  normal
Milestone:             |  Component:  build
  Version:  unknown    |   Severity:  normal
 Keywords:  leastconn  |
 I've recently moved from Varnish + HAProxy to Varnish only, to handle the
 cache + the load balancing with a single software. I'm pretty happy with

 The only feature I've been missing from HAProxy is the leastconn load
 balancing algorithm. Their documentation describes it as:

 > for long connections, pick the least recently used of the servers with
 the lowest connection count

 In some situations, this is preferable to round robin, for example when
 the number of open connections to a backend is directly related to its
 load (this is the case when the backend performs CPU-intensive tasks) and
 the workload is uneven across requests. In this case, round-robin might
 end up sending several small workloads to a backend server, and several
 big workloads to another.

 The leastconn algorithm comes to the rescue by keeping the number of
 connections, and therefore the load, at a minimum on every server.

 Would you consider adding a leastconn director to Varnish?

Ticket URL: <https://www.varnish-cache.org/trac/ticket/1854>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list