Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Dev

[PATCH] add a least-connection director

 

 

Varnish dev RSS feed   Index | Next | Previous | View Threaded


fgsch at lodoss

Jan 21, 2012, 2:14 AM

Post #1 of 5 (370 views)
Permalink
[PATCH] add a least-connection director

Hi,

The diff below adds a least-connection director based on the random director.
Documentation and tests included.
Comments? OKs?

f.-

bin/varnishd/cache/cache_backend.h | 1 +
bin/varnishd/cache/cache_backend_cfg.c | 2 +
bin/varnishd/cache/cache_dir_random.c | 52 ++++++++++++++++++--
bin/varnishtest/tests/v00037.vtc | 86 ++++++++++++++++++++++++++++++++
doc/sphinx/reference/vcl.rst | 11 ++++
lib/libvcl/vcc_backend.c | 1 +
7 files changed, 150 insertions(+), 5 deletions(-)

diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h
index ad71169..6105ed3 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -190,3 +190,4 @@ dir_init_f VRT_init_dir_random;
dir_init_f VRT_init_dir_round_robin;
dir_init_f VRT_init_dir_fallback;
dir_init_f VRT_init_dir_client;
+dir_init_f VRT_init_dir_least_connection;
diff --git a/bin/varnishd/cache/cache_backend_cfg.c b/bin/varnishd/cache/cache_backend_cfg.c
index c2d022d..9bed6ed 100644
--- a/bin/varnishd/cache/cache_backend_cfg.c
+++ b/bin/varnishd/cache/cache_backend_cfg.c
@@ -263,6 +263,8 @@ VRT_init_dir(struct cli *cli, struct director **dir, const char *name,
VRT_init_dir_fallback(cli, dir, idx, priv);
else if (!strcmp(name, "client"))
VRT_init_dir_client(cli, dir, idx, priv);
+ else if (!strcmp(name, "least-connection"))
+ VRT_init_dir_least_connection(cli, dir, idx, priv);
else
INCOMPL();
}
diff --git a/bin/varnishd/cache/cache_dir_random.c b/bin/varnishd/cache/cache_dir_random.c
index b323343..84a1224 100644
--- a/bin/varnishd/cache/cache_dir_random.c
+++ b/bin/varnishd/cache/cache_dir_random.c
@@ -26,8 +26,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * This code is shared between the random, client and hash directors, because
- * they share the same properties and most of the same selection logic.
+ * This code is shared between the random, client, hash and least-connection
+ * directors, because they share the same properties and most of the same
+ * selection logic.
*
* The random director picks a backend on random.
*
@@ -35,6 +36,9 @@
*
* The client director picks based on client identity or IP-address
*
+ * The least-connection director picks a backend with the least number of
+ * established connections.
+ *
* In all cases, the choice is by weight of the healthy subset of
* configured backends.
*
@@ -63,7 +67,7 @@ struct vdi_random_host {
double weight;
};

-enum crit_e {c_random, c_hash, c_client};
+enum crit_e {c_random, c_hash, c_client, c_least_connection};

struct vdi_random {
unsigned magic;
@@ -185,6 +189,36 @@ vdi_random_getfd(const struct director *d, struct sess *sp)
return (NULL);
}

+static struct vbc *
+vdi_least_connection_getfd(const struct director *d, struct sess *sp)
+{
+ int i, m;
+ struct vdi_random *vs;
+ struct backend *b1, *b2;
+
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ CAST_OBJ_NOTNULL(vs, d->priv, VDI_RANDOM_MAGIC);
+
+ for (m = 0; m < vs->nhosts; m++) {
+ if (!VDI_Healthy(vs->hosts[m].backend, sp))
+ continue;
+ b1 = vdi_get_backend_if_simple(vs->hosts[m].backend);
+ for (i = m + 1; i < vs->nhosts; i++) {
+ if (!VDI_Healthy(vs->hosts[i].backend, sp))
+ continue;
+ b2 = vdi_get_backend_if_simple(vs->hosts[i].backend);
+ if (b1->refcount * vs->hosts[i].weight >
+ b2->refcount * vs->hosts[m].weight) {
+ b1 = b2;
+ m = i;
+ }
+ }
+ return (VDI_GetFd(vs->hosts[m].backend, sp));
+ }
+ return (NULL);
+}
+
/*
* Healthy if just a single backend is...
*/
@@ -241,7 +275,10 @@ vrt_init(struct cli *cli, struct director **bp, int idx,
vs->dir.priv = vs;
vs->dir.name = "random";
REPLACE(vs->dir.vcl_name, t->name);
- vs->dir.getfd = vdi_random_getfd;
+ if (criteria == c_least_connection)
+ vs->dir.getfd = vdi_least_connection_getfd;
+ else
+ vs->dir.getfd = vdi_random_getfd;
vs->dir.fini = vdi_random_fini;
vs->dir.healthy = vdi_random_healthy;

@@ -283,3 +320,10 @@ VRT_init_dir_client(struct cli *cli, struct director **bp, int idx,
{
vrt_init(cli, bp, idx, priv, c_client);
}
+
+void
+VRT_init_dir_least_connection(struct cli *cli, struct director **bp, int idx,
+ const void *priv)
+{
+ vrt_init(cli, bp, idx, priv, c_least_connection);
+}
diff --git a/bin/varnishtest/tests/v00037.vtc b/bin/varnishtest/tests/v00037.vtc
new file mode 100644
index 0000000..f392f6f
--- /dev/null
+++ b/bin/varnishtest/tests/v00037.vtc
@@ -0,0 +1,86 @@
+varnishtest "Test least-connection director"
+
+server s1 {
+ rxreq
+ sema r1 sync 3
+ sema r1 sync 2
+ txresp -hdr "be: s1"
+ close
+
+ accept
+ rxreq
+ txresp -hdr "be: s1"
+} -start
+
+server s2 {
+ rxreq
+ sema r1 sync 3
+ txresp -hdr "be: s2"
+ close
+
+ accept
+ rxreq
+ txresp -hdr "be: s2"
+} -start
+
+server s3 {
+ rxreq
+ txresp -hdr "be: s3"
+ close
+
+ accept
+ rxreq
+ txresp -hdr "be: s3"
+} -start
+
+varnish v1 -vcl+backend {
+ director lc least-connection {
+ { .backend = s1; .weight = 1; }
+ { .backend = s2; .weight = 1; }
+ { .backend = s3; .weight = 1; }
+ }
+ sub vcl_recv {
+ set req.backend = lc;
+ return (pass);
+ }
+} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.status == 200
+} -start
+
+client c2 {
+ txreq
+ rxresp
+ expect resp.status == 200
+} -start
+
+delay .5
+
+client c3 {
+ txreq
+ rxresp
+ expect resp.status == 200
+
+ txreq
+ rxresp
+ expect resp.http.be == "s3"
+
+ sema r1 sync 3
+
+ txreq
+ rxresp
+ expect resp.http.be == "s2"
+
+ sema r1 sync 2
+
+ txreq
+ rxresp
+ expect resp.http.be == "s1"
+} -start
+
+client c1 -wait
+client c2 -wait
+client c3 -wait
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 2c185ed..68be210 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -275,6 +275,17 @@ An example of a fallback director::
// are unhealthy.
}

+The least-connection director
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The least-connection director will pick a backend with the least number of
+established connections.
+
+Each backend requires a .weight option which sets the amount of traffic
+each backend will get compared to the others. Equal weight means equal
+traffic. A backend with lower weight than an other will get proportionally
+less traffic.
+
Backend probes
--------------

diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c
index fb160e7..d1a8a31 100644
--- a/lib/libvcl/vcc_backend.c
+++ b/lib/libvcl/vcc_backend.c
@@ -688,6 +688,7 @@ static const struct dirlist {
{ "hash", vcc_ParseRandomDirector },
{ "random", vcc_ParseRandomDirector },
{ "client", vcc_ParseRandomDirector },
+ { "least-connection", vcc_ParseRandomDirector },
{ "round-robin", vcc_ParseRoundRobinDirector },
{ "fallback", vcc_ParseRoundRobinDirector },
{ "dns", vcc_ParseDnsDirector },

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


fgsch at lodoss

Feb 14, 2012, 5:27 PM

Post #2 of 5 (349 views)
Permalink
Re: [PATCH] add a least-connection director [In reply to]

On Sat, 21 Jan 2012 10:14:27 +0000
"Federico G. Schwindt" <fgsch [at] lodoss> wrote:

> Hi,
>
> The diff below adds a least-connection director based on the random director.
> Documentation and tests included.
> Comments? OKs?

Updated diff against trunk.
Anyone?

bin/varnishd/cache/cache_backend.h | 1 +
bin/varnishd/cache/cache_backend_cfg.c | 2 +
bin/varnishd/cache/cache_dir_random.c | 52 ++++++++++++++++++--
bin/varnishtest/tests/v00038.vtc | 86 ++++++++++++++++++++++++++++++++
doc/sphinx/reference/vcl.rst | 11 ++++
lib/libvcl/vcc_backend.c | 1 +
6 files changed, 149 insertions(+), 4 deletions(-)

diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h
index b1688f9..82f32c2 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -192,3 +192,4 @@ dir_init_f VRT_init_dir_random;
dir_init_f VRT_init_dir_round_robin;
dir_init_f VRT_init_dir_fallback;
dir_init_f VRT_init_dir_client;
+dir_init_f VRT_init_dir_least_connection;
diff --git a/bin/varnishd/cache/cache_backend_cfg.c b/bin/varnishd/cache/cache_backend_cfg.c
index c2d022d..9bed6ed 100644
--- a/bin/varnishd/cache/cache_backend_cfg.c
+++ b/bin/varnishd/cache/cache_backend_cfg.c
@@ -263,6 +263,8 @@ VRT_init_dir(struct cli *cli, struct director **dir, const char *name,
VRT_init_dir_fallback(cli, dir, idx, priv);
else if (!strcmp(name, "client"))
VRT_init_dir_client(cli, dir, idx, priv);
+ else if (!strcmp(name, "least-connection"))
+ VRT_init_dir_least_connection(cli, dir, idx, priv);
else
INCOMPL();
}
diff --git a/bin/varnishd/cache/cache_dir_random.c b/bin/varnishd/cache/cache_dir_random.c
index b323343..7cd0708 100644
--- a/bin/varnishd/cache/cache_dir_random.c
+++ b/bin/varnishd/cache/cache_dir_random.c
@@ -26,8 +26,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * This code is shared between the random, client and hash directors, because
- * they share the same properties and most of the same selection logic.
+ * This code is shared between the random, client, hash and least-connection
+ * directors, because they share the same properties and most of the same
+ * selection logic.
*
* The random director picks a backend on random.
*
@@ -35,6 +36,9 @@
*
* The client director picks based on client identity or IP-address
*
+ * The least-connection director picks a backend with the least number of
+ * established connections.
+ *
* In all cases, the choice is by weight of the healthy subset of
* configured backends.
*
@@ -63,7 +67,7 @@ struct vdi_random_host {
double weight;
};

-enum crit_e {c_random, c_hash, c_client};
+enum crit_e {c_random, c_hash, c_client, c_least_connection};

struct vdi_random {
unsigned magic;
@@ -185,6 +189,36 @@ vdi_random_getfd(const struct director *d, struct sess *sp)
return (NULL);
}

+static struct vbc *
+vdi_least_connection_getfd(const struct director *d, struct sess *sp)
+{
+ int i, m;
+ struct vdi_random *vs;
+ struct backend *bi, *bm;
+
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
+ CAST_OBJ_NOTNULL(vs, d->priv, VDI_RANDOM_MAGIC);
+
+ for (m = 0; m < vs->nhosts; m++) {
+ if (!VDI_Healthy(vs->hosts[m].backend, sp))
+ continue;
+ bm = vdi_get_backend_if_simple(vs->hosts[m].backend);
+ for (i = m + 1; i < vs->nhosts; i++) {
+ if (!VDI_Healthy(vs->hosts[i].backend, sp))
+ continue;
+ bi = vdi_get_backend_if_simple(vs->hosts[i].backend);
+ if (bm->refcount * vs->hosts[i].weight >
+ bi->refcount * vs->hosts[m].weight) {
+ bm = bi;
+ m = i;
+ }
+ }
+ return (VDI_GetFd(vs->hosts[m].backend, sp));
+ }
+ return (NULL);
+}
+
/*
* Healthy if just a single backend is...
*/
@@ -241,7 +275,10 @@ vrt_init(struct cli *cli, struct director **bp, int idx,
vs->dir.priv = vs;
vs->dir.name = "random";
REPLACE(vs->dir.vcl_name, t->name);
- vs->dir.getfd = vdi_random_getfd;
+ if (criteria == c_least_connection)
+ vs->dir.getfd = vdi_least_connection_getfd;
+ else
+ vs->dir.getfd = vdi_random_getfd;
vs->dir.fini = vdi_random_fini;
vs->dir.healthy = vdi_random_healthy;

@@ -283,3 +320,10 @@ VRT_init_dir_client(struct cli *cli, struct director **bp, int idx,
{
vrt_init(cli, bp, idx, priv, c_client);
}
+
+void
+VRT_init_dir_least_connection(struct cli *cli, struct director **bp, int idx,
+ const void *priv)
+{
+ vrt_init(cli, bp, idx, priv, c_least_connection);
+}
diff --git a/bin/varnishtest/tests/v00038.vtc b/bin/varnishtest/tests/v00038.vtc
new file mode 100644
index 0000000..f392f6f
--- /dev/null
+++ b/bin/varnishtest/tests/v00038.vtc
@@ -0,0 +1,86 @@
+varnishtest "Test least-connection director"
+
+server s1 {
+ rxreq
+ sema r1 sync 3
+ sema r1 sync 2
+ txresp -hdr "be: s1"
+ close
+
+ accept
+ rxreq
+ txresp -hdr "be: s1"
+} -start
+
+server s2 {
+ rxreq
+ sema r1 sync 3
+ txresp -hdr "be: s2"
+ close
+
+ accept
+ rxreq
+ txresp -hdr "be: s2"
+} -start
+
+server s3 {
+ rxreq
+ txresp -hdr "be: s3"
+ close
+
+ accept
+ rxreq
+ txresp -hdr "be: s3"
+} -start
+
+varnish v1 -vcl+backend {
+ director lc least-connection {
+ { .backend = s1; .weight = 1; }
+ { .backend = s2; .weight = 1; }
+ { .backend = s3; .weight = 1; }
+ }
+ sub vcl_recv {
+ set req.backend = lc;
+ return (pass);
+ }
+} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.status == 200
+} -start
+
+client c2 {
+ txreq
+ rxresp
+ expect resp.status == 200
+} -start
+
+delay .5
+
+client c3 {
+ txreq
+ rxresp
+ expect resp.status == 200
+
+ txreq
+ rxresp
+ expect resp.http.be == "s3"
+
+ sema r1 sync 3
+
+ txreq
+ rxresp
+ expect resp.http.be == "s2"
+
+ sema r1 sync 2
+
+ txreq
+ rxresp
+ expect resp.http.be == "s1"
+} -start
+
+client c1 -wait
+client c2 -wait
+client c3 -wait
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 1ef14d6..373e6f8 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -275,6 +275,17 @@ An example of a fallback director::
// are unhealthy.
}

+The least-connection director
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The least-connection director will pick a backend with the least number of
+established connections.
+
+Each backend requires a .weight option which sets the amount of traffic
+each backend will get compared to the others. Equal weight means equal
+traffic. A backend with lower weight than an other will get proportionally
+less traffic.
+
Backend probes
--------------

diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c
index fb160e7..d1a8a31 100644
--- a/lib/libvcl/vcc_backend.c
+++ b/lib/libvcl/vcc_backend.c
@@ -688,6 +688,7 @@ static const struct dirlist {
{ "hash", vcc_ParseRandomDirector },
{ "random", vcc_ParseRandomDirector },
{ "client", vcc_ParseRandomDirector },
+ { "least-connection", vcc_ParseRandomDirector },
{ "round-robin", vcc_ParseRoundRobinDirector },
{ "fallback", vcc_ParseRoundRobinDirector },
{ "dns", vcc_ParseDnsDirector },

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


tfheen at varnish-software

Mar 29, 2012, 1:31 AM

Post #3 of 5 (296 views)
Permalink
Re: [PATCH] add a least-connection director [In reply to]

]] Federico G. Schwindt

Hi,

> On Sat, 21 Jan 2012 10:14:27 +0000
> "Federico G. Schwindt" <fgsch [at] lodoss> wrote:
>
> > Hi,
> >
> > The diff below adds a least-connection director based on the random director.
> > Documentation and tests included.
> > Comments? OKs?
>
> Updated diff against trunk.

Fails for me on make distcheck, any idea why?

**** top 0.0 macro def varnishd=../varnishd/varnishd
**** top 0.0 macro def pwd=/home/tfheen/varnish/bin/varnishtest
**** top 0.0 macro def topbuild=/home/tfheen/varnish/bin/varnishtest/../..
**** top 0.0 macro def bad_ip=10.255.255.255
**** top 0.0 macro def tmpdir=/tmp/vtc.27004.4c2262bf
* top 0.0 TEST tests/v00038.vtc starting
*** top 0.0 varnishtest
* top 0.0 TEST Test least-connection director
*** top 0.0 server
** s1 0.0 Starting server
**** s1 0.0 macro def s1_addr=127.0.0.1
**** s1 0.0 macro def s1_port=53652
**** s1 0.0 macro def s1_sock=127.0.0.1 53652
* s1 0.0 Listen on 127.0.0.1 53652
*** top 0.0 server
** s2 0.0 Starting server
** s1 0.0 Started on 127.0.0.1 53652
**** s2 0.0 macro def s2_addr=127.0.0.1
**** s2 0.0 macro def s2_port=45207
**** s2 0.0 macro def s2_sock=127.0.0.1 45207
* s2 0.0 Listen on 127.0.0.1 45207
*** top 0.0 server
** s3 0.0 Starting server
** s2 0.0 Started on 127.0.0.1 45207
**** s3 0.0 macro def s3_addr=127.0.0.1
**** s3 0.0 macro def s3_port=35684
**** s3 0.0 macro def s3_sock=127.0.0.1 35684
* s3 0.0 Listen on 127.0.0.1 35684
*** top 0.0 varnish
** s3 0.0 Started on 127.0.0.1 35684
** v1 0.0 Launch
*** v1 0.0 CMD: cd ${pwd} && ${varnishd} -d -d -n /tmp/vtc.27004.4c2262bf/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tmp/vtc.27004.4c2262bf/v1/_S -M '127.0.0.1 48915' -P /tmp/vtc.27004.4c2262bf/v1/varnishd.pid -sfile,/tmp/vtc.27004.4c2262bf/v1,10M
*** v1 0.0 CMD: cd /home/tfheen/varnish/bin/varnishtest && ../varnishd/varnishd -d -d -n /tmp/vtc.27004.4c2262bf/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tmp/vtc.27004.4c2262bf/v1/_S -M '127.0.0.1 48915' -P /tmp/vtc.27004.4c2262bf/v1/varnishd.pid -sfile,/tmp/vtc.27004.4c2262bf/v1,10M
*** v1 0.0 PID: 27026
*** v1 0.0 debug| Platform: Linux,3.2.0-2-amd64,x86_64,-sfile,-smalloc,-hcritbit\n
*** v1 0.0 debug| 200 239 \n
*** v1 0.0 debug| -----------------------------\n
*** v1 0.0 debug| Varnish Cache CLI 1.0\n
*** v1 0.0 debug| -----------------------------\n
*** v1 0.0 debug| Linux,3.2.0-2-amd64,x86_64,-sfile,-smalloc,-hcritbit\n
*** v1 0.0 debug| \n
*** v1 0.0 debug| Type 'help' for command list.\n
*** v1 0.0 debug| Type 'quit' to close CLI session.\n
*** v1 0.0 debug| Type 'start' to launch worker process.\n
*** v1 0.0 debug| \n
**** v1 0.1 CLIPOLL 1 0x1 0x0
*** v1 0.1 CLI connection fd = 10
*** v1 0.1 CLI RX 107
**** v1 0.1 CLI RX| jeewhbchriitfqnmdlljphjdymdhvwme\n
**** v1 0.1 CLI RX| \n
**** v1 0.1 CLI RX| Authentication required.\n
**** v1 0.1 CLI TX| auth e11fc5df61935fc9b91e446bc02cbf070862be830d2db4bfe4ae5a6ccfbe0a33\n
*** v1 0.1 CLI RX 200
**** v1 0.1 CLI RX| -----------------------------\n
**** v1 0.1 CLI RX| Varnish Cache CLI 1.0\n
**** v1 0.1 CLI RX| -----------------------------\n
**** v1 0.1 CLI RX| Linux,3.2.0-2-amd64,x86_64,-sfile,-smalloc,-hcritbit\n
**** v1 0.1 CLI RX| \n
**** v1 0.1 CLI RX| Type 'help' for command list.\n
**** v1 0.1 CLI RX| Type 'quit' to close CLI session.\n
**** v1 0.1 CLI RX| Type 'start' to launch worker process.\n
**** v1 0.1 CLI TX| vcl.inline vcl1 << %XJEIFLH|)Xspa8P\n
**** v1 0.1 CLI TX| backend s1 { .host = "127.0.0.1"; .port = "53652"; }\n
**** v1 0.1 CLI TX| backend s2 { .host = "127.0.0.1"; .port = "45207"; }\n
**** v1 0.1 CLI TX| backend s3 { .host = "127.0.0.1"; .port = "35684"; }\n
**** v1 0.1 CLI TX| \n
**** v1 0.1 CLI TX| \n
**** v1 0.1 CLI TX| \tdirector lc least-connection {\n
**** v1 0.1 CLI TX| \t\t{ .backend = s1; .weight = 1; }\n
**** v1 0.1 CLI TX| \t\t{ .backend = s2; .weight = 1; }\n
**** v1 0.1 CLI TX| \t\t{ .backend = s3; .weight = 1; }\n
**** v1 0.1 CLI TX| \t}\n
**** v1 0.1 CLI TX| \tsub vcl_recv {\n
**** v1 0.1 CLI TX| \t\tset req.backend = lc;\n
**** v1 0.1 CLI TX| \t\treturn (pass);\n
**** v1 0.1 CLI TX| \t}\n
**** v1 0.1 CLI TX| \n
**** v1 0.1 CLI TX| %XJEIFLH|)Xspa8P\n
*** v1 0.2 CLI RX 200
**** v1 0.2 CLI RX| VCL compiled.
**** v1 0.2 CLI TX| vcl.use vcl1
*** v1 0.2 CLI RX 200
** v1 0.2 Start
**** v1 0.2 CLI TX| start
*** v1 0.3 debug| child (27052) Started\n
*** v1 0.3 CLI RX 200
*** v1 0.3 wait-running
**** v1 0.3 CLI TX| status
*** v1 0.3 debug| Child (27052) said Not running as root, no priv-sep\n
*** v1 0.3 debug| Child (27052) said Child starts\n
*** v1 0.3 debug| Child (27052) said SMF.s0 mmap'ed 10485760 bytes of 10485760\n
*** v1 0.3 CLI RX 200
**** v1 0.3 CLI RX| Child in state running
**** v1 0.3 CLI TX| debug.xid 1000
*** v1 0.4 CLI RX 200
**** v1 0.4 CLI RX| XID is 1000
**** v1 0.4 CLI TX| debug.listen_address
**** v1 0.4 vsl| 0 CLI - Rd vcl.load "vcl1" ./vcl.qB2JUoQd.so
**** v1 0.4 vsl| 0 CLI - Wr 200 36 Loaded "./vcl.qB2JUoQd.so" as "vcl1"
**** v1 0.4 vsl| 0 CLI - Rd vcl.use "vcl1"
**** v1 0.4 vsl| 0 CLI - Wr 200 0
**** v1 0.4 vsl| 0 CLI - Rd start
**** v1 0.4 vsl| 0 CLI - Wr 200 0
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53931c70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53929c70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53921c70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f5390dc70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538fdc70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53905c70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538f5c70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538edc70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538e5c70 start
**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538ddc70 start
**** v1 0.4 vsl| 0 CLI - Rd debug.xid 1000
**** v1 0.4 vsl| 0 CLI - Wr 200 11 XID is 1000
*** v1 0.4 CLI RX 200
**** v1 0.4 CLI RX| 127.0.0.1 37617\n
** v1 0.4 Listen on 127.0.0.1 37617
**** v1 0.4 macro def v1_addr=127.0.0.1
**** v1 0.4 macro def v1_port=37617
**** v1 0.4 macro def v1_sock=127.0.0.1 37617
*** top 0.4 client
** c1 0.4 Starting client
*** top 0.4 client
** c2 0.4 Starting client
*** c1 0.4 Connect to 127.0.0.1 37617
*** top 0.4 delay
*** top 0.4 delaying 0.5 second(s)
*** c2 0.4 Connect to 127.0.0.1 37617
*** c1 0.4 connected fd 15 from 127.0.0.1 50667 to 127.0.0.1 37617
*** c2 0.4 connected fd 14 from 127.0.0.1 50668 to 127.0.0.1 37617
*** c1 0.4 txreq
**** c1 0.4 txreq| GET / HTTP/1.1\r\n
**** c1 0.4 txreq| \r\n
*** c2 0.4 txreq
**** c2 0.4 txreq| GET / HTTP/1.1\r\n
**** c2 0.4 txreq| \r\n
*** c2 0.4 rxresp
*** s1 0.4 accepted fd 5
*** s1 0.4 rxreq
**** s1 0.4 rxhdr| GET / HTTP/1.1\r\n
**** s1 0.4 rxhdr| X-Varnish: 1001\r\n
**** s1 0.4 rxhdr| Host: 127.0.0.1\r\n
**** s1 0.4 rxhdr| \r\n
**** s1 0.4 http[ 0] | GET
**** s1 0.4 http[ 1] | /
**** s1 0.4 http[ 2] | HTTP/1.1
**** s1 0.4 http[ 3] | X-Varnish: 1001
**** s1 0.4 http[ 4] | Host: 127.0.0.1
**** s1 0.4 bodylen = 0
*** s1 0.4 sema
**** s1 0.4 Sema(r1) wait 1 of 3
*** c1 0.4 rxresp
**** v1 0.5 vsl| 0 CLI - Rd debug.listen_address
**** v1 0.5 vsl| 0 CLI - Wr 200 16 127.0.0.1 37617

*** top 0.9 client
** c3 0.9 Starting client
*** top 0.9 client
** c1 0.9 Waiting for client
*** c3 0.9 Connect to 127.0.0.1 37617
*** c3 0.9 connected fd 16 from 127.0.0.1 50671 to 127.0.0.1 37617
*** c3 0.9 txreq
**** c3 0.9 txreq| GET / HTTP/1.1\r\n
**** c3 0.9 txreq| \r\n
*** s2 0.9 accepted fd 7
*** s2 0.9 rxreq
**** s2 0.9 rxhdr| GET / HTTP/1.1\r\n
**** s2 0.9 rxhdr| X-Varnish: 1003\r\n
**** s2 0.9 rxhdr| Host: 127.0.0.1\r\n
**** s2 0.9 rxhdr| \r\n
**** s2 0.9 http[ 0] | GET
**** s2 0.9 http[ 1] | /
**** s2 0.9 http[ 2] | HTTP/1.1
**** s2 0.9 http[ 3] | X-Varnish: 1003
**** s2 0.9 http[ 4] | Host: 127.0.0.1
**** s2 0.9 bodylen = 0
*** s2 0.9 sema
**** s2 0.9 Sema(r1) wait 2 of 3
*** c3 0.9 rxresp
**** v1 3.3 vsl| 0 CLI - Rd ping
**** v1 3.3 vsl| 0 CLI - Wr 200 19 PONG 1333009603 1.0
**** v1 6.3 vsl| 0 CLI - Rd ping
**** v1 6.3 vsl| 0 CLI - Wr 200 19 PONG 1333009606 1.0
**** v1 9.3 vsl| 0 CLI - Rd ping
**** v1 9.3 vsl| 0 CLI - Wr 200 19 PONG 1333009609 1.0
**** v1 12.3 vsl| 0 CLI - Rd ping
**** v1 12.3 vsl| 0 CLI - Wr 200 19 PONG 1333009612 1.0
**** v1 15.4 vsl| 0 CLI - Rd ping
**** v1 15.4 vsl| 0 CLI - Wr 200 19 PONG 1333009615 1.0
---- c2 15.4 HTTP rx timeout (fd:14 15000 ms)
---- c1 15.4 HTTP rx timeout (fd:15 15000 ms)
* top 15.4 RESETTING after tests/v00038.vtc
** s1 15.4 Waiting for server
**** s1 15.4 macro undef s1_addr
**** s1 15.4 macro undef s1_port
**** s1 15.4 macro undef s1_sock
** s2 15.4 Waiting for server
**** v1 15.5 vsl| 17 BereqRequest b GET
**** v1 15.5 vsl| 17 BereqURL b /
**** v1 15.5 vsl| 17 BereqProtocol b HTTP/1.1
**** v1 15.5 vsl| 17 BereqHeader b X-Varnish: 1002
**** v1 15.5 vsl| 17 BereqHeader b Host: 127.0.0.1
**** v1 15.5 vsl| 17 BackendClose b s1(127.0.0.1,,53652)
**** v1 15.5 vsl| 12 SessionOpen c 127.0.0.1 50668 127.0.0.1:0
**** v1 15.5 vsl| 12 ReqStart c 127.0.0.1 50668 1002
**** v1 15.5 vsl| 12 ReqRequest c GET
**** v1 15.5 vsl| 12 ReqURL c /
**** v1 15.5 vsl| 12 ReqProtocol c HTTP/1.1
**** v1 15.5 vsl| 12 VCL_call c recv
**** v1 15.5 vsl| 12 VCL_return c pass
**** v1 15.5 vsl| 12 VCL_call c hash
**** v1 15.5 vsl| 12 Hash c /
**** v1 15.5 vsl| 12 Hash c 127.0.0.1
**** v1 15.5 vsl| 12 VCL_return c hash
**** v1 15.5 vsl| 12 VCL_call c pass
**** v1 15.5 vsl| 12 VCL_return c pass
**** v1 15.5 vsl| 12 BackendOpen c 17 s1(127.0.0.1,,53652) 127.0.0.1 38443
**** v1 15.5 vsl| 12 Backend c 17 lc s1(127.0.0.1,,53652)
**** v1 15.5 vsl| 12 FetchError c http first read error: -1 104 (Connection reset by peer)
**** v1 15.5 vsl| 12 VCL_call c error
**** v1 15.5 vsl| 12 VCL_return c deliver
**** v1 15.5 vsl| 12 VCL_call c deliver
**** v1 15.5 vsl| 12 VCL_return c deliver
**** v1 15.5 vsl| 12 RespProtocol c HTTP/1.1
**** v1 15.5 vsl| 12 RespStatus c 503
**** v1 15.5 vsl| 12 RespResponse c Service Unavailable
**** v1 15.5 vsl| 12 RespHeader c Server: Varnish
**** v1 15.5 vsl| 12 RespHeader c Content-Type: text/html; charset=utf-8
**** v1 15.5 vsl| 12 RespHeader c Retry-After: 5
**** v1 15.5 vsl| 12 RespHeader c Content-Length: 413
**** v1 15.5 vsl| 12 RespHeader c Accept-Ranges: bytes
**** v1 15.5 vsl| 12 RespHeader c Date: Thu, 29 Mar 2012 08:26:55 GMT
**** v1 15.5 vsl| 12 RespHeader c X-Varnish: 1002
**** v1 15.5 vsl| 12 RespHeader c Age: 15
**** v1 15.5 vsl| 12 RespHeader c Via: 1.1 varnish
**** v1 15.5 vsl| 12 RespHeader c Connection: close
**** v1 15.5 vsl| 12 Length c 413
**** v1 15.5 vsl| 12 ReqEnd c 1002 1333009600.319918633 1333009615.336753130 0.000022650 15.016654015 0.000180483
**** v1 15.5 vsl| 12 SessionClose c error
**** v1 15.5 vsl| 12 StatSess c 127.0.0.1 50668 15 1 1 0 1 0 252 413
**** v1 18.4 vsl| 0 CLI - Rd ping
**** v1 18.4 vsl| 0 CLI - Wr 200 19 PONG 1333009618 1.0
**** v1 21.4 vsl| 0 CLI - Rd ping
**** v1 21.4 vsl| 0 CLI - Wr 200 19 PONG 1333009621 1.0
**** v1 24.4 vsl| 0 CLI - Rd ping
**** v1 24.4 vsl| 0 CLI - Wr 200 19 PONG 1333009624 1.0
**** v1 27.4 vsl| 0 CLI - Rd ping
**** v1 27.4 vsl| 0 CLI - Wr 200 19 PONG 1333009627 1.0
**** v1 30.4 vsl| 0 CLI - Rd ping
**** v1 30.4 vsl| 0 CLI - Wr 200 19 PONG 1333009630 1.0
**** v1 33.4 vsl| 0 CLI - Rd ping
**** v1 33.4 vsl| 0 CLI - Wr 200 19 PONG 1333009633 1.0
**** v1 36.4 vsl| 0 CLI - Rd ping
**** v1 36.4 vsl| 0 CLI - Wr 200 19 PONG 1333009636 1.0
**** v1 39.3 vsl| 0 CLI - Rd ping
**** v1 39.3 vsl| 0 CLI - Wr 200 19 PONG 1333009639 1.0
**** v1 42.3 vsl| 0 CLI - Rd ping
**** v1 42.3 vsl| 0 CLI - Wr 200 19 PONG 1333009642 1.0
**** v1 45.3 vsl| 0 CLI - Rd ping
**** v1 45.3 vsl| 0 CLI - Wr 200 19 PONG 1333009645 1.0
**** v1 48.3 vsl| 0 CLI - Rd ping
**** v1 48.3 vsl| 0 CLI - Wr 200 19 PONG 1333009648 1.0
**** v1 51.3 vsl| 0 CLI - Rd ping
**** v1 51.3 vsl| 0 CLI - Wr 200 19 PONG 1333009651 1.0
**** v1 54.3 vsl| 0 CLI - Rd ping
**** v1 54.3 vsl| 0 CLI - Wr 200 19 PONG 1333009654 1.0
**** v1 57.3 vsl| 0 CLI - Rd ping
**** v1 57.3 vsl| 0 CLI - Wr 200 19 PONG 1333009657 1.0

# top TEST tests/v00038.vtc FAILED (60.060) signal=9 exit=0

--
Tollef Fog Heen
Technical lead, Varnish Software
t: +47 21 98 92 64

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


fgsch at lodoss

Mar 29, 2012, 3:38 AM

Post #4 of 5 (298 views)
Permalink
Re: [PATCH] add a least-connection director [In reply to]

No, will check tonight. Was fine last time I checked.

Tollef Fog Heen <tfheen [at] varnish-software> wrote:

>]] Federico G. Schwindt
>
>Hi,
>
>> On Sat, 21 Jan 2012 10:14:27 +0000
>> "Federico G. Schwindt" <fgsch [at] lodoss> wrote:
>>
>> > Hi,
>> >
>> > The diff below adds a least-connection director based on the random director.
>> > Documentation and tests included.
>> > Comments? OKs?
>>
>> Updated diff against trunk.
>
>Fails for me on make distcheck, any idea why?
>
>**** top 0.0 macro def varnishd=../varnishd/varnishd
>**** top 0.0 macro def pwd=/home/tfheen/varnish/bin/varnishtest
>**** top 0.0 macro def topbuild=/home/tfheen/varnish/bin/varnishtest/../..
>**** top 0.0 macro def bad_ip=10.255.255.255
>**** top 0.0 macro def tmpdir=/tmp/vtc.27004.4c2262bf
>* top 0.0 TEST tests/v00038.vtc starting
>*** top 0.0 varnishtest
>* top 0.0 TEST Test least-connection director
>*** top 0.0 server
>** s1 0.0 Starting server
>**** s1 0.0 macro def s1_addr=127.0.0.1
>**** s1 0.0 macro def s1_port=53652
>**** s1 0.0 macro def s1_sock=127.0.0.1 53652
>* s1 0.0 Listen on 127.0.0.1 53652
>*** top 0.0 server
>** s2 0.0 Starting server
>** s1 0.0 Started on 127.0.0.1 53652
>**** s2 0.0 macro def s2_addr=127.0.0.1
>**** s2 0.0 macro def s2_port=45207
>**** s2 0.0 macro def s2_sock=127.0.0.1 45207
>* s2 0.0 Listen on 127.0.0.1 45207
>*** top 0.0 server
>** s3 0.0 Starting server
>** s2 0.0 Started on 127.0.0.1 45207
>**** s3 0.0 macro def s3_addr=127.0.0.1
>**** s3 0.0 macro def s3_port=35684
>**** s3 0.0 macro def s3_sock=127.0.0.1 35684
>* s3 0.0 Listen on 127.0.0.1 35684
>*** top 0.0 varnish
>** s3 0.0 Started on 127.0.0.1 35684
>** v1 0.0 Launch
>*** v1 0.0 CMD: cd ${pwd} && ${varnishd} -d -d -n /tmp/vtc.27004.4c2262bf/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tmp/vtc.27004.4c2262bf/v1/_S -M '127.0.0.1 48915' -P /tmp/vtc.27004.4c2262bf/v1/varnishd.pid -sfile,/tmp/vtc.27004.4c2262bf/v1,10M
>*** v1 0.0 CMD: cd /home/tfheen/varnish/bin/varnishtest && ../varnishd/varnishd -d -d -n /tmp/vtc.27004.4c2262bf/v1 -l 10m,1m,- -p auto_restart=off -p syslog_cli_traffic=off -a '127.0.0.1:0' -S /tmp/vtc.27004.4c2262bf/v1/_S -M '127.0.0.1 48915' -P /tmp/vtc.27004.4c2262bf/v1/varnishd.pid -sfile,/tmp/vtc.27004.4c2262bf/v1,10M
>*** v1 0.0 PID: 27026
>*** v1 0.0 debug| Platform: Linux,3.2.0-2-amd64,x86_64,-sfile,-smalloc,-hcritbit\n
>*** v1 0.0 debug| 200 239 \n
>*** v1 0.0 debug| -----------------------------\n
>*** v1 0.0 debug| Varnish Cache CLI 1.0\n
>*** v1 0.0 debug| -----------------------------\n
>*** v1 0.0 debug| Linux,3.2.0-2-amd64,x86_64,-sfile,-smalloc,-hcritbit\n
>*** v1 0.0 debug| \n
>*** v1 0.0 debug| Type 'help' for command list.\n
>*** v1 0.0 debug| Type 'quit' to close CLI session.\n
>*** v1 0.0 debug| Type 'start' to launch worker process.\n
>*** v1 0.0 debug| \n
>**** v1 0.1 CLIPOLL 1 0x1 0x0
>*** v1 0.1 CLI connection fd = 10
>*** v1 0.1 CLI RX 107
>**** v1 0.1 CLI RX| jeewhbchriitfqnmdlljphjdymdhvwme\n
>**** v1 0.1 CLI RX| \n
>**** v1 0.1 CLI RX| Authentication required.\n
>**** v1 0.1 CLI TX| auth e11fc5df61935fc9b91e446bc02cbf070862be830d2db4bfe4ae5a6ccfbe0a33\n
>*** v1 0.1 CLI RX 200
>**** v1 0.1 CLI RX| -----------------------------\n
>**** v1 0.1 CLI RX| Varnish Cache CLI 1.0\n
>**** v1 0.1 CLI RX| -----------------------------\n
>**** v1 0.1 CLI RX| Linux,3.2.0-2-amd64,x86_64,-sfile,-smalloc,-hcritbit\n
>**** v1 0.1 CLI RX| \n
>**** v1 0.1 CLI RX| Type 'help' for command list.\n
>**** v1 0.1 CLI RX| Type 'quit' to close CLI session.\n
>**** v1 0.1 CLI RX| Type 'start' to launch worker process.\n
>**** v1 0.1 CLI TX| vcl.inline vcl1 << %XJEIFLH|)Xspa8P\n
>**** v1 0.1 CLI TX| backend s1 { .host = "127.0.0.1"; .port = "53652"; }\n
>**** v1 0.1 CLI TX| backend s2 { .host = "127.0.0.1"; .port = "45207"; }\n
>**** v1 0.1 CLI TX| backend s3 { .host = "127.0.0.1"; .port = "35684"; }\n
>**** v1 0.1 CLI TX| \n
>**** v1 0.1 CLI TX| \n
>**** v1 0.1 CLI TX| \tdirector lc least-connection {\n
>**** v1 0.1 CLI TX| \t\t{ .backend = s1; .weight = 1; }\n
>**** v1 0.1 CLI TX| \t\t{ .backend = s2; .weight = 1; }\n
>**** v1 0.1 CLI TX| \t\t{ .backend = s3; .weight = 1; }\n
>**** v1 0.1 CLI TX| \t}\n
>**** v1 0.1 CLI TX| \tsub vcl_recv {\n
>**** v1 0.1 CLI TX| \t\tset req.backend = lc;\n
>**** v1 0.1 CLI TX| \t\treturn (pass);\n
>**** v1 0.1 CLI TX| \t}\n
>**** v1 0.1 CLI TX| \n
>**** v1 0.1 CLI TX| %XJEIFLH|)Xspa8P\n
>*** v1 0.2 CLI RX 200
>**** v1 0.2 CLI RX| VCL compiled.
>**** v1 0.2 CLI TX| vcl.use vcl1
>*** v1 0.2 CLI RX 200
>** v1 0.2 Start
>**** v1 0.2 CLI TX| start
>*** v1 0.3 debug| child (27052) Started\n
>*** v1 0.3 CLI RX 200
>*** v1 0.3 wait-running
>**** v1 0.3 CLI TX| status
>*** v1 0.3 debug| Child (27052) said Not running as root, no priv-sep\n
>*** v1 0.3 debug| Child (27052) said Child starts\n
>*** v1 0.3 debug| Child (27052) said SMF.s0 mmap'ed 10485760 bytes of 10485760\n
>*** v1 0.3 CLI RX 200
>**** v1 0.3 CLI RX| Child in state running
>**** v1 0.3 CLI TX| debug.xid 1000
>*** v1 0.4 CLI RX 200
>**** v1 0.4 CLI RX| XID is 1000
>**** v1 0.4 CLI TX| debug.listen_address
>**** v1 0.4 vsl| 0 CLI - Rd vcl.load "vcl1" ./vcl.qB2JUoQd.so
>**** v1 0.4 vsl| 0 CLI - Wr 200 36 Loaded "./vcl.qB2JUoQd.so" as "vcl1"
>**** v1 0.4 vsl| 0 CLI - Rd vcl.use "vcl1"
>**** v1 0.4 vsl| 0 CLI - Wr 200 0
>**** v1 0.4 vsl| 0 CLI - Rd start
>**** v1 0.4 vsl| 0 CLI - Wr 200 0
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53931c70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53929c70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53921c70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f5390dc70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538fdc70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f53905c70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538f5c70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538edc70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538e5c70 start
>**** v1 0.4 vsl| 0 WorkThread - 0x7f4f538ddc70 start
>**** v1 0.4 vsl| 0 CLI - Rd debug.xid 1000
>**** v1 0.4 vsl| 0 CLI - Wr 200 11 XID is 1000
>*** v1 0.4 CLI RX 200
>**** v1 0.4 CLI RX| 127.0.0.1 37617\n
>** v1 0.4 Listen on 127.0.0.1 37617
>**** v1 0.4 macro def v1_addr=127.0.0.1
>**** v1 0.4 macro def v1_port=37617
>**** v1 0.4 macro def v1_sock=127.0.0.1 37617
>*** top 0.4 client
>** c1 0.4 Starting client
>*** top 0.4 client
>** c2 0.4 Starting client
>*** c1 0.4 Connect to 127.0.0.1 37617
>*** top 0.4 delay
>*** top 0.4 delaying 0.5 second(s)
>*** c2 0.4 Connect to 127.0.0.1 37617
>*** c1 0.4 connected fd 15 from 127.0.0.1 50667 to 127.0.0.1 37617
>*** c2 0.4 connected fd 14 from 127.0.0.1 50668 to 127.0.0.1 37617
>*** c1 0.4 txreq
>**** c1 0.4 txreq| GET / HTTP/1.1\r\n
>**** c1 0.4 txreq| \r\n
>*** c2 0.4 txreq
>**** c2 0.4 txreq| GET / HTTP/1.1\r\n
>**** c2 0.4 txreq| \r\n
>*** c2 0.4 rxresp
>*** s1 0.4 accepted fd 5
>*** s1 0.4 rxreq
>**** s1 0.4 rxhdr| GET / HTTP/1.1\r\n
>**** s1 0.4 rxhdr| X-Varnish: 1001\r\n
>**** s1 0.4 rxhdr| Host: 127.0.0.1\r\n
>**** s1 0.4 rxhdr| \r\n
>**** s1 0.4 http[ 0] | GET
>**** s1 0.4 http[ 1] | /
>**** s1 0.4 http[ 2] | HTTP/1.1
>**** s1 0.4 http[ 3] | X-Varnish: 1001
>**** s1 0.4 http[ 4] | Host: 127.0.0.1
>**** s1 0.4 bodylen = 0
>*** s1 0.4 sema
>**** s1 0.4 Sema(r1) wait 1 of 3
>*** c1 0.4 rxresp
>**** v1 0.5 vsl| 0 CLI - Rd debug.listen_address
>**** v1 0.5 vsl| 0 CLI - Wr 200 16 127.0.0.1 37617
>
>*** top 0.9 client
>** c3 0.9 Starting client
>*** top 0.9 client
>** c1 0.9 Waiting for client
>*** c3 0.9 Connect to 127.0.0.1 37617
>*** c3 0.9 connected fd 16 from 127.0.0.1 50671 to 127.0.0.1 37617
>*** c3 0.9 txreq
>**** c3 0.9 txreq| GET / HTTP/1.1\r\n
>**** c3 0.9 txreq| \r\n
>*** s2 0.9 accepted fd 7
>*** s2 0.9 rxreq
>**** s2 0.9 rxhdr| GET / HTTP/1.1\r\n
>**** s2 0.9 rxhdr| X-Varnish: 1003\r\n
>**** s2 0.9 rxhdr| Host: 127.0.0.1\r\n
>**** s2 0.9 rxhdr| \r\n
>**** s2 0.9 http[ 0] | GET
>**** s2 0.9 http[ 1] | /
>**** s2 0.9 http[ 2] | HTTP/1.1
>**** s2 0.9 http[ 3] | X-Varnish: 1003
>**** s2 0.9 http[ 4] | Host: 127.0.0.1
>**** s2 0.9 bodylen = 0
>*** s2 0.9 sema
>**** s2 0.9 Sema(r1) wait 2 of 3
>*** c3 0.9 rxresp
>**** v1 3.3 vsl| 0 CLI - Rd ping
>**** v1 3.3 vsl| 0 CLI - Wr 200 19 PONG 1333009603 1.0
>**** v1 6.3 vsl| 0 CLI - Rd ping
>**** v1 6.3 vsl| 0 CLI - Wr 200 19 PONG 1333009606 1.0
>**** v1 9.3 vsl| 0 CLI - Rd ping
>**** v1 9.3 vsl| 0 CLI - Wr 200 19 PONG 1333009609 1.0
>**** v1 12.3 vsl| 0 CLI - Rd ping
>**** v1 12.3 vsl| 0 CLI - Wr 200 19 PONG 1333009612 1.0
>**** v1 15.4 vsl| 0 CLI - Rd ping
>**** v1 15.4 vsl| 0 CLI - Wr 200 19 PONG 1333009615 1.0
>---- c2 15.4 HTTP rx timeout (fd:14 15000 ms)
>---- c1 15.4 HTTP rx timeout (fd:15 15000 ms)
>* top 15.4 RESETTING after tests/v00038.vtc
>** s1 15.4 Waiting for server
>**** s1 15.4 macro undef s1_addr
>**** s1 15.4 macro undef s1_port
>**** s1 15.4 macro undef s1_sock
>** s2 15.4 Waiting for server
>**** v1 15.5 vsl| 17 BereqRequest b GET
>**** v1 15.5 vsl| 17 BereqURL b /
>**** v1 15.5 vsl| 17 BereqProtocol b HTTP/1.1
>**** v1 15.5 vsl| 17 BereqHeader b X-Varnish: 1002
>**** v1 15.5 vsl| 17 BereqHeader b Host: 127.0.0.1
>**** v1 15.5 vsl| 17 BackendClose b s1(127.0.0.1,,53652)
>**** v1 15.5 vsl| 12 SessionOpen c 127.0.0.1 50668 127.0.0.1:0
>**** v1 15.5 vsl| 12 ReqStart c 127.0.0.1 50668 1002
>**** v1 15.5 vsl| 12 ReqRequest c GET
>**** v1 15.5 vsl| 12 ReqURL c /
>**** v1 15.5 vsl| 12 ReqProtocol c HTTP/1.1
>**** v1 15.5 vsl| 12 VCL_call c recv
>**** v1 15.5 vsl| 12 VCL_return c pass
>**** v1 15.5 vsl| 12 VCL_call c hash
>**** v1 15.5 vsl| 12 Hash c /
>**** v1 15.5 vsl| 12 Hash c 127.0.0.1
>**** v1 15.5 vsl| 12 VCL_return c hash
>**** v1 15.5 vsl| 12 VCL_call c pass
>**** v1 15.5 vsl| 12 VCL_return c pass
>**** v1 15.5 vsl| 12 BackendOpen c 17 s1(127.0.0.1,,53652) 127.0.0.1 38443
>**** v1 15.5 vsl| 12 Backend c 17 lc s1(127.0.0.1,,53652)
>**** v1 15.5 vsl| 12 FetchError c http first read error: -1 104 (Connection reset by peer)
>**** v1 15.5 vsl| 12 VCL_call c error
>**** v1 15.5 vsl| 12 VCL_return c deliver
>**** v1 15.5 vsl| 12 VCL_call c deliver
>**** v1 15.5 vsl| 12 VCL_return c deliver
>**** v1 15.5 vsl| 12 RespProtocol c HTTP/1.1
>**** v1 15.5 vsl| 12 RespStatus c 503
>**** v1 15.5 vsl| 12 RespResponse c Service Unavailable
>**** v1 15.5 vsl| 12 RespHeader c Server: Varnish
>**** v1 15.5 vsl| 12 RespHeader c Content-Type: text/html; charset=utf-8
>**** v1 15.5 vsl| 12 RespHeader c Retry-After: 5
>**** v1 15.5 vsl| 12 RespHeader c Content-Length: 413
>**** v1 15.5 vsl| 12 RespHeader c Accept-Ranges: bytes
>**** v1 15.5 vsl| 12 RespHeader c Date: Thu, 29 Mar 2012 08:26:55 GMT
>**** v1 15.5 vsl| 12 RespHeader c X-Varnish: 1002
>**** v1 15.5 vsl| 12 RespHeader c Age: 15
>**** v1 15.5 vsl| 12 RespHeader c Via: 1.1 varnish
>**** v1 15.5 vsl| 12 RespHeader c Connection: close
>**** v1 15.5 vsl| 12 Length c 413
>**** v1 15.5 vsl| 12 ReqEnd c 1002 1333009600.319918633 1333009615.336753130 0.000022650 15.016654015 0.000180483
>**** v1 15.5 vsl| 12 SessionClose c error
>**** v1 15.5 vsl| 12 StatSess c 127.0.0.1 50668 15 1 1 0 1 0 252 413
>**** v1 18.4 vsl| 0 CLI - Rd ping
>**** v1 18.4 vsl| 0 CLI - Wr 200 19 PONG 1333009618 1.0
>**** v1 21.4 vsl| 0 CLI - Rd ping
>**** v1 21.4 vsl| 0 CLI - Wr 200 19 PONG 1333009621 1.0
>**** v1 24.4 vsl| 0 CLI - Rd ping
>**** v1 24.4 vsl| 0 CLI - Wr 200 19 PONG 1333009624 1.0
>**** v1 27.4 vsl| 0 CLI - Rd ping
>**** v1 27.4 vsl| 0 CLI - Wr 200 19 PONG 1333009627 1.0
>**** v1 30.4 vsl| 0 CLI - Rd ping
>**** v1 30.4 vsl| 0 CLI - Wr 200 19 PONG 1333009630 1.0
>**** v1 33.4 vsl| 0 CLI - Rd ping
>**** v1 33.4 vsl| 0 CLI - Wr 200 19 PONG 1333009633 1.0
>**** v1 36.4 vsl| 0 CLI - Rd ping
>**** v1 36.4 vsl| 0 CLI - Wr 200 19 PONG 1333009636 1.0
>**** v1 39.3 vsl| 0 CLI - Rd ping
>**** v1 39.3 vsl| 0 CLI - Wr 200 19 PONG 1333009639 1.0
>**** v1 42.3 vsl| 0 CLI - Rd ping
>**** v1 42.3 vsl| 0 CLI - Wr 200 19 PONG 1333009642 1.0
>**** v1 45.3 vsl| 0 CLI - Rd ping
>**** v1 45.3 vsl| 0 CLI - Wr 200 19 PONG 1333009645 1.0
>**** v1 48.3 vsl| 0 CLI - Rd ping
>**** v1 48.3 vsl| 0 CLI - Wr 200 19 PONG 1333009648 1.0
>**** v1 51.3 vsl| 0 CLI - Rd ping
>**** v1 51.3 vsl| 0 CLI - Wr 200 19 PONG 1333009651 1.0
>**** v1 54.3 vsl| 0 CLI - Rd ping
>**** v1 54.3 vsl| 0 CLI - Wr 200 19 PONG 1333009654 1.0
>**** v1 57.3 vsl| 0 CLI - Rd ping
>**** v1 57.3 vsl| 0 CLI - Wr 200 19 PONG 1333009657 1.0
>
># top TEST tests/v00038.vtc FAILED (60.060) signal=9 exit=0
>
>--
>Tollef Fog Heen
>Technical lead, Varnish Software
>t: +47 21 98 92 64
_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


tfheen at varnish-software

Apr 10, 2012, 1:52 AM

Post #5 of 5 (282 views)
Permalink
Re: [PATCH] add a least-connection director [In reply to]

]] Federico G. Schwindt

Hi,

> No, will check tonight. Was fine last time I checked.

have you had any progress on this? I'd like to get this merged if
possible. :-)

Regards,
--
Tollef Fog Heen
Technical lead, Varnish Software
t: +47 21 98 92 64

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Varnish dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.