[6.0] 65d0c0c39 Formatting
Federico G. Schwindt
fgsch at lodoss.net
Thu Aug 16 08:52:27 UTC 2018
commit 65d0c0c395aaeadfe0f8344ad30caa0086c7e094
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue Mar 27 20:48:59 2018 -0300
Formatting
diff --git a/lib/libvmod_directors/vmod.vcc b/lib/libvmod_directors/vmod.vcc
index a1a625f58..cc5f9aed2 100644
--- a/lib/libvmod_directors/vmod.vcc
+++ b/lib/libvmod_directors/vmod.vcc
@@ -339,16 +339,13 @@ when configuring the shard director, you are advised to check::
$Method VOID .set_warmup(REAL probability=0.0)
Set the default warmup probability. See the `warmup` parameter of
-``shard.backend()``.
-
-Default: 0.0 (no warmup)
+``shard.backend()``. If probability is 0.0 (default), warmup is
+disabled.
$Method VOID .set_rampup(DURATION duration=0)
Set the default rampup duration. See `rampup` parameter of
-`shard.backend()`.
-
-Default: 0s (no rampup)
+`shard.backend()`. If duration is 0 (default), rampup is disabled.
$Method VOID .associate(BLOB param=0)
@@ -415,13 +412,13 @@ To generate sharding keys using other hashes, use a custom vmod like
.. _vmod blobdigest: https://code.uplex.de/uplex-varnish/libvmod-blobdigest/blob/master/README.rst
$Method BACKEND .backend(
- [ ENUM {HASH, URL, KEY, BLOB} by ],
+ [ ENUM {HASH, URL, KEY, BLOB} by=HASH ],
[ INT key ],
[ BLOB key_blob ],
- [ INT alt ],
- [ REAL warmup ],
- [ BOOL rampup ],
- [ ENUM {CHOSEN, IGNORE, ALL} healthy ],
+ [ INT alt=0 ],
+ [ REAL warmup=-1 ],
+ [ BOOL rampup=1 ],
+ [ ENUM {CHOSEN, IGNORE, ALL} healthy=CHOSEN ],
[ BLOB param ],
[ ENUM {NOW, LAZY} resolve] )
@@ -436,8 +433,6 @@ is _not_ the order given when backends are added.
* `by` how to determine the sharding key
- default: `HASH`
-
* `HASH`:
* when called in backend context: Use the varnish hash value as
@@ -451,21 +446,19 @@ is _not_ the order given when backends are added.
* `BLOB`: use the `key_blob` argument
- * `key` lookup key with `by=KEY`
+* `key` lookup key with `by=KEY`
- the `shard.key()` function may come handy to generate a sharding
- key from custom strings.
+ the `shard.key()` function may come handy to generate a sharding
+ key from custom strings.
- * `key_blob` lookup key with `by=BLOB`
+* `key_blob` lookup key with `by=BLOB`
- Currently, this uses the first 4 bytes from the given blob in
- network byte order (big endian), left-padded with zeros for blobs
- smaller than 4 bytes.
+ Currently, this uses the first 4 bytes from the given blob in
+ network byte order (big endian), left-padded with zeros for blobs
+ smaller than 4 bytes.
* `alt` alternative backend selection
- default: `0`
-
Select the `alt`-th alternative backend for the given `key`.
This is particularly useful for retries / restarts due to backend
@@ -476,8 +469,6 @@ is _not_ the order given when backends are added.
* `rampup` slow start for servers which just went healthy
- default: `true`
-
If `alt==0` and the chosen backend is in its rampup period, with a
probability proportional to the fraction of time since the backup
became healthy to the rampup period, return the next alternative
@@ -491,8 +482,6 @@ is _not_ the order given when backends are added.
possible values: -1, 0..1
- default: `-1`
-
`-1`: use the warmup probability from the director definition
Only used for `alt==0`: Sets the ratio of requests (0.0 to 1.0) that
@@ -505,8 +494,6 @@ is _not_ the order given when backends are added.
* `healthy`
- default: `CHOSEN`
-
* CHOSEN: Return a healthy backend if possible.
For `alt==0`, return the first healthy backend or none.
More information about the varnish-commit
mailing list