[master] efc1871 Improve backend_hint + director example

Lasse Karstensen lkarsten at varnish-software.com
Tue Mar 25 18:32:45 CET 2014


commit efc187150ab61681113f5ca54825670931724c40
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Tue Mar 25 18:32:40 2014 +0100

    Improve backend_hint + director example

diff --git a/doc/sphinx/whats-new/upgrading.rst b/doc/sphinx/whats-new/upgrading.rst
index 402b693..3634a33 100644
--- a/doc/sphinx/whats-new/upgrading.rst
+++ b/doc/sphinx/whats-new/upgrading.rst
@@ -21,9 +21,26 @@ vcl_fetch is now vcl_backend_response
 Directors have been moved to the vmod_directors
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+To make directors (backend selection logic) easier to extend, the directors
+are now defined in loadable VMODs.
+
+Setting a backend for future fetches in `vcl_recv` is now done as follows::
+
+    sub vcl_init {
+        new cluster1 = directors.round_robin();
+        cluster1.add_backend(b1, 1.0);
+        cluster1.add_backend(b2, 1.0);
+    }
+    sub vcl_recv {
+        set req.backend_hint = cluster1.backend();
+    }
+
+Note the extra `.backend()` needed after the director name.
+
 Use the hash director as a client director
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Since the client director was already a special case of the hash director, it has been removed, and you should use the hash director directly::
+Since the client director was already a special case of the hash director, it
+has been removed, and you should use the hash director directly::
 
     sub vcl_init {
         new h = directors.hash();
@@ -102,6 +119,11 @@ The builtin VCL now honors Cache-Control: no-cache (and friends) to indicate
 uncacheable content from the backend.
 
 
+The `remove` keyword is gone
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Replaced by `unset`.
+
 Changes to parameters
 =====================
 



More information about the varnish-commit mailing list