124 lines
3.3 KiB
YAML
124 lines
3.3 KiB
YAML
base:
|
|
# listenPort is the port cdn server listens on.
|
|
# default: 8003
|
|
listenPort: 8003
|
|
|
|
# DownloadPort is the port for download files from cdn.
|
|
# And you should start a file server firstly which listens on the download port.
|
|
# default: 8001
|
|
downloadPort: 8001
|
|
|
|
# SystemReservedBandwidth is the network bandwidth reserved for system software.
|
|
# default: 20 MB, in format of G(B)/g/M(B)/m/K(B)/k/B, pure number will also be parsed as Byte.
|
|
systemReservedBandwidth: 20M
|
|
|
|
# MaxBandwidth is the network bandwidth that cdn can use.
|
|
# default: 1G, in format of G(B)/g/M(B)/m/K(B)/k/B, pure number will also be parsed as Byte.
|
|
maxBandwidth: 1G
|
|
|
|
# AdvertiseIP is used to set the ip that we advertise to other peer in the p2p-network.
|
|
# By default, the first non-loop address is advertised.
|
|
advertiseIP:
|
|
|
|
# FailAccessInterval is the interval time after failed to access the URL.
|
|
# If a task failed to be downloaded from the source, it will not be retried in the time since the last failure.
|
|
# default: 3m
|
|
failAccessInterval: 3m
|
|
|
|
# GCInitialDelay is the delay time from the start to the first GC execution.
|
|
# default: 6s
|
|
gcInitialDelay: 6s
|
|
|
|
# GCMetaInterval is the interval time to execute GC meta.
|
|
# default: 2m0s
|
|
gcMetaInterval: 2m
|
|
|
|
# TaskExpireTime when a task is not accessed within the taskExpireTime,
|
|
# and it will be treated to be expired.
|
|
# default: 3m0s
|
|
taskExpireTime: 3m
|
|
|
|
# storageMode is the Mode of storage policy, [disk/hybrid]
|
|
storageMode: disk
|
|
|
|
# logDir is the log storage directory
|
|
# in linux, default value is /var/log/dragonfly
|
|
# in macos(just for testing), default value is /Users/$USER/.dragonfly/logs
|
|
logDir: ""
|
|
|
|
# manager configuration
|
|
manager:
|
|
addr: ""
|
|
cdnClusterID: 0
|
|
keepAlive:
|
|
interval: 5s
|
|
|
|
# host configuration
|
|
host:
|
|
location:
|
|
idc:
|
|
|
|
# enable prometheus metrics
|
|
# metrics:
|
|
# # metrics service address
|
|
# addr: ":8000"
|
|
|
|
plugins:
|
|
storagedriver:
|
|
- name: disk
|
|
enable: true
|
|
config:
|
|
baseDir: /Users/${USER_HOME}/ftp
|
|
- name: memory
|
|
enable: false
|
|
config:
|
|
baseDir: /dev/shm/dragonfly
|
|
storagemanager:
|
|
- name: disk
|
|
enable: true
|
|
config:
|
|
gcInitialDelay: 0s
|
|
gcInterval: 15s
|
|
driverConfigs:
|
|
disk:
|
|
gcConfig:
|
|
youngGCThreshold: 100.0GB
|
|
fullGCThreshold: 5.0GB
|
|
cleanRatio: 1
|
|
intervalThreshold: 2h0m0s
|
|
- name: hybrid
|
|
enable: false
|
|
config:
|
|
gcInitialDelay: 0s
|
|
gcInterval: 15s
|
|
driverConfigs:
|
|
disk:
|
|
gcConfig:
|
|
youngGCThreshold: 100.0GB
|
|
fullGCThreshold: 5.0GB
|
|
cleanRatio: 1
|
|
intervalThreshold: 2h0m0s
|
|
memory:
|
|
gcConfig:
|
|
youngGCThreshold: 100.0GB
|
|
fullGCThreshold: 5.0GB
|
|
cleanRatio: 3
|
|
intervalThreshold: 2h0m0s
|
|
|
|
# console shows log on console
|
|
console: false
|
|
|
|
# whether to enable debug level logger and enable pprof
|
|
verbose: false
|
|
|
|
# listen port for pprof, only valid when the verbose option is true
|
|
# default is -1. If it is 0, pprof will use a random port.
|
|
pprof-port: -1
|
|
|
|
# jaeger endpoint url, like: http://jaeger.dragonfly.svc:14268/api/traces
|
|
jaeger: ""
|
|
|
|
# service name used in tracer
|
|
# default: dragonfly-cdn
|
|
service-name: dragonfly-cdn
|