Commit 16d58afe authored by Poul-Henning Kamp's avatar Poul-Henning Kamp
parents 863c22b8 6f7944c0
......@@ -1153,8 +1153,6 @@ MCF_ParamInit(struct cli *cli)
/*--------------------------------------------------------------------*/
#ifdef DIAGNOSTICS
void
MCF_DumpRst(void)
{
......@@ -1218,4 +1216,3 @@ MCF_DumpRst(void)
}
printf("\n");
}
#endif /* DIAGNOSTICS */
......@@ -503,12 +503,10 @@ main(int argc, char * const *argv)
VCS_Message("varnishd");
exit(0);
case 'x':
#ifdef DIAGNOSTICS
if (!strcmp(optarg, "dumprst")) {
MCF_DumpRst();
exit (0);
}
#endif /* DIAGNOSTICS */
usage();
break;
case 'w':
......
==================================
Changes from 3.0.0 to 3.0.1 beta 1
==================================
================================
Changes from 3.0.1 rc 1 to 3.0.1
================================
Varnishd
--------
- Fix crash in streaming code.
- Add `fallback` director, as a variant of the `round-robin`
director.
- The parameter `http_req_size` has been reduced on 32 bit machines.
VCL
---
- Disallow error in the `vcl_init` and `vcl_fini` VCL functions.
varnishncsa
-----------
- Fixed crash when using `-X`.
- Fix error when the time to first byte was in the format string.
Other
-----
- Documentation updates
================================
Changes from 3.0.0 to 3.0.1 rc 1
================================
Varnishd
--------
......
......@@ -117,6 +117,7 @@ EXTRA_DIST = \
phk/vcl_expr.rst \
reference/index.rst \
reference/shmem.rst \
reference/params.rst \
reference/varnishadm.rst \
reference/varnish-cli.rst \
reference/varnishd.rst \
......
This diff is collapsed.
This diff is collapsed.
......@@ -148,58 +148,69 @@ Configuring a director may look like this:::
}
}
The random director
~~~~~~~~~~~~~~~~~~~
The random director takes one per director option .retries. This
specifies how many tries it will use to find a working backend. The
default is the same as the number of backends defined for the
director.
There is also a per-backend option: weight which defines the portion
of traffic to send to the particular backend.
The round-robin director
~~~~~~~~~~~~~~~~~~~~~~~~
The family of random directors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are three directors that share the same logic, called the random
director, client director and hash director. They each distribute traffic
among the backends assigned to it using a random distribution seeded with
either the client identity, a random number or the cache hash (typically
url). Beyond the initial seed, they act the same.
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.
The director has an optional .retries option which defaults to the number
of backends the director has. The director will attempt .retries times to
find a healthy backend if the first attempt fails. Each attempt re-uses the
previous seed in an iterative manner. For the random director this detail
is of no importance as it will give different results each time. For the
hash and client director, this means the same URL or the same client will
fail to the same server consistently.
The round-robin director does not take any options.
The random director
...................
This uses a random number to seed the backend selection.
The client director
~~~~~~~~~~~~~~~~~~~
...................
The client director picks a backend based on the clients
*identity*. You can set the VCL variable *client.identity* to identify
the client by picking up the value of a session cookie or similar.
Note: from 2.1.0 to 2.1.3 *client.identity* isn't available and the
director will use automatically set the idenity based on client.ip In
2.1.4 and onwards you can set client.identity to any string available.
The client director takes one option - *retries* which set the number
of retries the director should take in order to find a healthy
backend.
The hash director
~~~~~~~~~~~~~~~~~
.................
The hash director will pick a backend based on the URL hash
value.
value.
This is useful is you are using Varnish to load balance in front of
other Varnish caches or other web accelerators as objects won't be
duplicated across caches.
The client director takes one option - *retries* which set the number
of retries the director should take in order to find a healthy
backend.
It will use the value of req.hash, just as the normal cache-lookup methods.
The round-robin director
~~~~~~~~~~~~~~~~~~~~~~~~
The round-robin director does not take any options.
It will use the first backend for the first request, the second backend for
the second request and so on, and start from the top again when it gets to
the end.
If a backend is unhealthy or Varnish fails to connect, it will be skipped.
The round-robin director will try all the backends once before giving up.
The DNS director
~~~~~~~~~~~~~~~~
The DNS director can use backends in three different ways. Either like the
The DNS director can use backends in two different ways. Either like the
random or round-robin director or using .list::
director directorname dns {
......@@ -216,6 +227,9 @@ random or round-robin director or using .list::
This will specify 384 backends, all using port 80 and a connection timeout
of 0.4s. Options must come before the list of IPs in the .list statement.
The .list-method does not support IPv6. It is not a white-list, it is an
actual list of backends that will be created internally in Varnish - the
larger subnet the more overhead.
The .ttl defines the cache duration of the DNS lookups.
......@@ -223,6 +237,12 @@ The above example will append "internal.example.net" to the incoming Host
header supplied by the client, before looking it up. All settings are
optional.
Health checks are not thoroughly supported.
DNS round robin balancing is supported. If a hostname resolves to multiple
backends, the director will divide the traffic between all of them in a
round-robin manner.
The fallback director
~~~~~~~~~~~~~~~~~~~~~
......
......@@ -60,6 +60,7 @@ vcs_version.h: FORCE
H="$$(head -n 1 vcs_version.h 2>/dev/null || true)"; \
if [ "/* $$V */" != "$$H" ]; then \
( \
echo "/* $$V */" ;\
echo '/*' ;\
echo ' * NB: This file is machine generated, DO NOT EDIT!' ;\
echo ' *' ;\
......
......@@ -188,6 +188,9 @@ vsm_open(struct VSM_data *vd, int diag)
if (diag)
vd->diag(vd->priv, "Cannot mmap %s: %s\n",
vd->fname, strerror(errno));
AZ(close(vd->vsm_fd));
vd->vsm_fd = -1;
vd->VSM_head = NULL;
return (1);
}
vd->vsm_end = (uint8_t *)vd->VSM_head + slh.shm_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment