<commit_before>.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006 Linpro AS
.\" All rights reserved.
.\"
.\" Author: <NAME> <<EMAIL>>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd October 6, 2006
.Dt VARNISHD 1
.Os
.Sh NAME
.Nm varnishd
.Nd HTTP accelerator daemon
.Sh SYNOPSIS
.Nm
.Op Fl a Ar addrss Ns Op : Ns Ar port
.Op Fl b Ar host Ns Op : Ns Ar port
.Op Fl d
.Op Fl f Ar config
.Op Fl h Ar type Ns Op , Ns Ar options
.Op Fl p Ar param Ns = Ns Ar value
.Op Fl s Ar type Ns Op , Ns Ar options
.Op Fl T Ar address Ns Op : Ns Ar port
.Op Fl t Ar ttl
.Op Fl V
.Op Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout
.Sh DESCRIPTION
The
.Nm
daemon accepts HTTP requests from clients, passes them on to a backend
server and caches the returned documents to better satisfy future
requests for the same document.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl a Ar address Ns Op : Ns Ar port
Listen for client requests on the specified
.Ar address
and
.Ar port .
The
.Ar address
can be a host name, an IPv4 dotted-quad, or an IPv6 address enclosed
in square brackets.
If
.Ar address
is not specified,
.Nm
will listen on all available interfaces.
If
.Ar port
is not specified, the default HTTP port as listed in
.Pa /etc/services
is used.
.It Fl b Ar host Ns Op : Ns Ar port
Use the specified
.Ar host
as backend server.
If
.Ar port
is not specified, the default is 8080.
.It Fl d
Enables debugging mode.
This causes
.Nm
to fork; the child process daemonizes and runs as usual, while the
parent process remains attached to the console and will accept
management commands from
.Dv stdin .
If the parent process receives
.Dv EOF ,
it will terminate, but the child process will continue to run.
.Pp
The child process will not start accepting client connections until
the
.Cm start
command is given.
.Pp
If the
.Fl d
flag is specified twice, the child process will not daemonize, and
terminating the parent process will also terminate the child.
.It Fl f Ar config
Use the specified VCL configuration file instead of the builtin
default.
.It Fl h Ar type Ns Op , Ns Ar options
Specifies the hash algorithm.
See
.Sx Hash Algorithms
for a list of supported algorithms.
.It Fl p Ar param Ns = Ns Ar value
Set the parameter specified by
.Ar param
to the specified
.Ar value .
See
.Sx Run-Time Parameters
for a list of parameters.
.It Fl s Ar type Ns Op , Ns Ar options
Use the specified storage backend.
See
.Sx Storage Types
for a list of supported storage types.
.It Fl T Ar address Ns Op : Ns Ar port
Offer a management interface on the specified
.Ar address
and
.Ar port .
See
.Sx Management Interface
for a list of management commands.
.It Fl t Ar ttl
Specifies a hard minimum time to live for cached documents.
.It Fl V
Display the version number and exit.
.It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout
Start at least
.Ar min
but no more than
.Ar max
worker threads with the specified idle timeout.
.Pp
If only
.Ar min
is specified,
.Nm
will start
.Ar min
threads and will not kill idle threads.
.Pp
If both
.Ar min
and
.Ar max
are specified, the number of threads is allowed to vary within the
specified range according to system load.
Idle threads are killed after
.Ar timeout
seconds.
.Pp
The default values are 1 for
.Ar min ,
infinity for
.Ar max ,
and 10 for
.Ar timeout .
.El
.Ss Hash Algorithms
The following hash algorithms are available:
.Bl -tag -width 4n<commit_msg>Actual default max is 1000, not infinity.<commit_after>.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006 Linpro AS
.\" All rights reserved.
.\"
.\" Author: <NAME> <<EMAIL>>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd October 6, 2006
.Dt VARNISHD 1
.Os
.Sh NAME
.Nm varnishd
.Nd HTTP accelerator daemon
.Sh SYNOPSIS
.Nm
.Op Fl a Ar addrss Ns Op : Ns Ar port
.Op Fl b Ar host Ns Op : Ns Ar port
.Op Fl d
.Op Fl f Ar config
.Op Fl h Ar type Ns Op , Ns Ar options
.Op Fl p Ar param Ns = Ns Ar value
.Op Fl s Ar type Ns Op , Ns Ar options
.Op Fl T Ar address Ns Op : Ns Ar port
.Op Fl t Ar ttl
.Op Fl V
.Op Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout
.Sh DESCRIPTION
The
.Nm
daemon accepts HTTP requests from clients, passes them on to a backend
server and caches the returned documents to better satisfy future
requests for the same document.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl a Ar address Ns Op : Ns Ar port
Listen for client requests on the specified
.Ar address
and
.Ar port .
The
.Ar address
can be a host name, an IPv4 dotted-quad, or an IPv6 address enclosed
in square brackets.
If
.Ar address
is not specified,
.Nm
will listen on all available interfaces.
If
.Ar port
is not specified, the default HTTP port as listed in
.Pa /etc/services
is used.
.It Fl b Ar host Ns Op : Ns Ar port
Use the specified
.Ar host
as backend server.
If
.Ar port
is not specified, the default is 8080.
.It Fl d
Enables debugging mode.
This causes
.Nm
to fork; the child process daemonizes and runs as usual, while the
parent process remains attached to the console and will accept
management commands from
.Dv stdin .
If the parent process receives
.Dv EOF ,
it will terminate, but the child process will continue to run.
.Pp
The child process will not start accepting client connections until
the
.Cm start
command is given.
.Pp
If the
.Fl d
flag is specified twice, the child process will not daemonize, and
terminating the parent process will also terminate the child.
.It Fl f Ar config
Use the specified VCL configuration file instead of the builtin
default.
.It Fl h Ar type Ns Op , Ns Ar options
Specifies the hash algorithm.
See
.Sx Hash Algorithms
for a list of supported algorithms.
.It Fl p Ar param Ns = Ns Ar value
Set the parameter specified by
.Ar param
to the specified
.Ar value .
See
.Sx Run-Time Parameters
for a list of parameters.
.It Fl s Ar type Ns Op , Ns Ar options
Use the specified storage backend.
See
.Sx Storage Types
for a list of supported storage types.
.It Fl T Ar address Ns Op : Ns Ar port
Offer a management interface on the specified
.Ar address
and
.Ar port .
See
.Sx Management Interface
for a list of management commands.
.It Fl t Ar ttl
Specifies a hard minimum time to live for cached documents.
.It Fl V
Display the version number and exit.
.It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout
Start at least
.Ar min
but no more than
.Ar max
worker threads with the specified idle timeout.
.Pp
If only
.Ar min
is specified,
.Nm
will start
.Ar min
threads and will not kill idle threads.
.Pp
If both
.Ar min
and
.Ar max
are specified, the number of threads is allowed to vary within the
specified range according to system load.
Idle threads are killed after
.Ar timeout
seconds.
.Pp
The default values are 1 for
.Ar min ,
1000 for
.Ar max ,
and 10 for
.Ar timeout .
.El
.Ss Hash Algorithms
The following hash algorithms are available:
.Bl -tag -width 4n
{'fraction_non_alphanumeric': 0.06227417640807652, 'fraction_numerical': 0.006376195536663124, 'mean_word_length': 3.4349670122525917, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2229307', 'n_tokens_mistral': 2922, 'n_tokens_neox': 2674, 'n_words': 1635}