Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
VCL-BACKENDS(7)						       VCL-BACKENDS(7)

NAME
       VCL-backends - Configuring Backends

BACKEND	DEFINITION
       A  backend  declaration creates and initialises a named backend object.
       A declaration start with	the keyword backend followed by	 the  name  of
       the  backend.  The  actual  declaration	is  in	curly  brackets,  in a
       key/value fashion.:

	  backend name {
	      .attribute1 = value;
	      .attribute2 = value;
	      [...]
	  }

       If there	is a backend named default it  will  be	 used  unless  another
       backend	is  explicitly	set.  If no backend is named default the first
       backend in the VCL program becomes the default.

       If you only use dynamic backends	created	by  VMODs,  an	empty,	always
       failing (503) backend can be specified:

	  backend default none;

       A  backend  must	be specified with either a .host or a .path attribute,
       but not both.  All other	attributes have	default	values.

ATTRIBUTE .HOST
       To specify a networked backend .host takes either a  numeric  IPv4/IPv6
       address	or  a  domain  name which resolves to at most one IPv4 and one
       IPv6 address:

	  .host	= "127.0.0.1";

	  .host	= "[::1]:8080";

	  .host	= "example.com:8081";

       The TCP port number can be specied as part of .host as a	bove or	 sepa-
       rately using the	.port attribute:

	  .port	= 8081;

ATTRIBUTE .PATH
       The absolute path to a Unix(4) domain socket of a local backend:

	  .path	= "/var/run/http.sock";

       A  warning will be issued if the	uds-socket does	not exist when the VCL
       is loaded.  This	makes it possible to start the UDS-listening peer,  or
       set the socket file's permissions afterwards.

       If  the	uds-socket  socket  does not exist or permissions deny access,
       connection attempts will	fail.

ATTRIBUTE .HOST_HEADER
       A host header to	add to probes and regular  backend  requests  if  they
       have no such header:

	  .host_header = "Host:	example.com";

TIMEOUT	ATTRIBUTES
       These  attributes  control  how	patient	 varnishd  is  during  backend
       fetches:

	  .connect_timeout = 1.4s;
	  .first_byte_timeout =	20s;
	  .between_bytes_timeout = 10s;

       The default values comes	parameters  with  the  same  names,  see  var-
       nishd(1).

ATTRIBUTE .MAX_CONNECTIONS
       Limit  how  many	simultaneous connections varnish can open to the back-
       end:

	  .max_connections = 1000;

ATTRIBUTE .PROXY_HEADER
       Send a PROXY protocol header to the  backend  with  the	client.ip  and
       server.ip values:

	  .proxy_header	= 2;

       Legal values are	one and	two, depending which version of	the PROXY pro-
       tocol you want.

       Notice this setting will	lead to	backend	connections being used	for  a
       single  request only (subject to	future improvements). Thus, extra care
       should be taken to avoid	running	into failing backend connections  with
       EADDRNOTAVAIL  due  to no local ports being available. Possible options
       are:

	  o Use	additional backend connections to extra	IP  addresses  or  TCP
	    ports

	  o Increase   the   number   of   available   ports   (Linux	sysctl
	    net.ipv4.ip_local_port_range)

	  o Reuse   backend   connection    ports    early    (Linux	sysctl
	    net.ipv4.tcp_tw_reuse)

ATTRIBUTE .PREAMBLE
       Send a BLOB on all newly	opened connections to the backend:

	  .preamble = :SGVsbG8gV29ybGRcbgo=:;

ATTRIBUTE .PROBE
       Please see vcl-probe(7).

SEE ALSO
       o varnishd(1)

       o vcl(7)

       o vcl-probe(7)

       o vmod_directors(3)

       o vmod_std(3)

HISTORY
       VCL was developed by Poul-Henning Kamp in cooperation with Verdens Gang
       AS, Redpill Linpro and Varnish Software.	 This manual page  is  written
       by  Per	Buer,  Poul-Henning Kamp, Martin Blix Grydeland, Kristian Lyn-
       gstA,l, Lasse Karstensen	and others.

COPYRIGHT
       This document is	licensed under the same	license	as Varnish itself. See
       LICENSE for details.

       o Copyright (c) 2006 Verdens Gang AS

       o Copyright (c) 2006-2021 Varnish Software AS

							       VCL-BACKENDS(7)

NAME | BACKEND DEFINITION | ATTRIBUTE .HOST | ATTRIBUTE .PATH | ATTRIBUTE .HOST_HEADER | TIMEOUT ATTRIBUTES | ATTRIBUTE .MAX_CONNECTIONS | ATTRIBUTE .PROXY_HEADER | ATTRIBUTE .PREAMBLE | ATTRIBUTE .PROBE | SEE ALSO | HISTORY | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=vcl-backend&sektion=7&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help