Skip to content

Instantly share code, notes, and snippets.

@lkarsten
Created September 21, 2015 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lkarsten/77137452d176c236cd96 to your computer and use it in GitHub Desktop.
Save lkarsten/77137452d176c236cd96 to your computer and use it in GitHub Desktop.
vcl 4.0;
import std;
import directors;
backend a1 { .host = "192.0.2.11"; }
backend b1 { .host = "192.0.2.11"; }
sub vcl_init {
new hdir = directors.hash();
hdir.add_backend(a1); hdir.add_backend(a2);
hdir.add_backend(a3); hdir.add_backend(a4);
}
sub vcl_recv {
set req.backend_hint = rrA.backend(client.ip);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment