Varnish系列之二:服務(wù)腳本解析

[Unit]

Description=Varnish Cache, a high-performance HTTP accelerator

After=network.target

[Service]

# If you want to make changes to this file, please copy it to

# /etc/systemd/system/varnish.service and make your changes there.

# This will override the file kept at /lib/systemd/system/varnish.service

#

# Enviroment variables may be found in /etc/varnish/varnish.params

#

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

LimitNOFILE=131072

# Locked shared memory (for ulimit -l)

# Default log size is 82MB + header

LimitMEMLOCK=82000

# On systemd >= 228 enable this to avoid "fork failed" on reload.

#TasksMax=infinity

# Maximum size of the corefile.

LimitCORE=infinity

EnvironmentFile=/etc/varnish/varnish.params

Type=forking

PIDFile=/var/run/varnish.pid

PrivateTmp=true

ExecStart=/usr/sbin/varnishd \

-P /var/run/varnish.pid \

-f $VARNISH_VCL_CONF \

-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \

-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \

-S $VARNISH_SECRET_FILE \

-u $VARNISH_USER -g $VARNISH_GROUP \

-s $VARNISH_STORAGE \

$DAEMON_OPTS

ExecReload=/usr/sbin/varnish_reload_vcl


參數(shù)配置文件:/etc/varnish/varnish.params

OPTIONS

? ? ? -a address[:port][,address[:port][...]

? ? ? ? ? ? ? Listen? for client requests on the specified address and port.

? ? ? -P file

? ? ? ? ? ? ? Write the process's PID to the specified file.

? ? ? -f config

? ? ? ? ? ? ? Use? the specified VCL configuration file instead of the builtin default.

? ? ? -g group

? ? ? ? ? ? ? Specifies the name of an unprivileged group to which the child process should switch before it starts accepting connections.

? ? ? -u user

? ? ? ? ? ? ? Specifies the name of an unprivileged user to which the child process should switch before it starts accepting connections.

? ? ? -S file

? ? ? ? ? ? ? Path to a file containing a secret used for authorizing access to the management port.

? ? ? -T address[:port]

? ? ? ? ? ? ? Offer a management interface on the specified address and port.

? ? ? -s [name=]type[,options]

? ? ? ? ? ? ? Use the specified storage backend. The storage backends can be one of the following:

? ? ? ? ? ? ? ? ? ? · malloc[,size]

? ? ? ? ? ? ? ? ? ? · file[,path[,size[,granularity]]]

? ? ? ? ? ? ? ? ? ? · persistent,path,size

? ? ? -p param=value

? ? ? ? ? ? ? Set? the? parameter specified by param to the specified value.

Run-Time Parameters

? Runtime parameters are marked with shorthand flags to avoid repeating the same text over and over in the table below.

? thread_pool_max

? ? ? The maximum number of worker threads in each pool.

? thread_pool_min

? ? ? The minimum number of worker threads in each pool.

? thread_pool_timeout

? ? ? Thread idle threshold.

? ? ? Threads in excess of thread_pool_min, which have been idle for at least this long, will be destroyed.

? thread_pools

? ? ? Number of worker thread pools.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc閱讀 2,993評論 0 0
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,854評論 0 10
  • =========================================================...
    lavor閱讀 3,649評論 0 5
  • 1.介紹 運(yùn)維日常: 2.Web Page Cache: varnish2.0,3.0處理過程 varnish4....
    尛尛大尹閱讀 3,472評論 0 0
  • 還有5天。一顆焦躁不安的心,甚至不知道自己為什么會這樣。1分8秒。該用怎么樣的心情來體會這還沒開始就停止的視頻。是...
    葉書閱讀 179評論 0 0

友情鏈接更多精彩內(nèi)容