## Configuration file for varnish
##
## /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
## to be set from this shell script fragment.
##
## Should we start varnishd at boot?  Set to "no" to disable.
START=yes

## Maximum number of open files (for ulimit -n)
NFILES=131072

## Maximum locked memory size (for ulimit -l)
## Used for locking the shared memory log in memory.  If you increase log size,
## you need to increase this number as well
MEMLOCK=82000

## Default varnish instance name is the local nodename.  Can be overridden with
## the -n switch, to have more instances on a single server.
## INSTANCE=$(uname -n)
##
##
############################################################## 
#Alternative 1, Minimal configuration, no VCL
##############################################################
## Listen on port 6081, administration on localhost:6082, and forward to
## content server on localhost:8080.  Use a 1GB fixed-size cache file.
##
# DAEMON_OPTS="-a :6081 \
#               -T localhost:6082 \
#               -b localhost:8080 \
#               -u varnish -g varnish \
#               -S /etc/varnish/secret \
#               -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
##
##
############################################################## 
##Alternative 1, Minimal configuration, no VCL
##############################################################
## Listen on port 6081, administration on localhost:6082, and forward to
## one content server selected by the vcl file, based on the request.  Use a 1GB
## fixed-size cache file.
## Varnish server IP: 127.0.0.1
DAEMON_OPTS="-a :80 \
            -T 127.0.0.1:6082 \
            -f /etc/varnish/default.vcl \
            -S /etc/varnish/secret \
            -t 120 \
            -p thread_pools=2 \
            -p thread_pool_min=100  \
            -p thread_pool_max=500 \
            -p listen_depth=128 \
            -p thread_pool_add_delay=2\
            -p connect_timeout=300 \
            -s malloc,2G";

