-
Notifications
You must be signed in to change notification settings - Fork 262
/
cdn.yaml
125 lines (108 loc) · 3.65 KB
/
cdn.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# CDN 配置模版
# 你可以通过修改这里的配置项来自定义你的 CDN
base:
# CDN 服务监听的端口
# 默认值:8003
listenPort: 8003
# CDN 提供文件下载服务的端口
# 你需要先启动一个文件服务器,并且该文件服务器监听该下载端口。
# 默认值:8001
downloadPort: 8001
# 为系统软件预留的网络带宽
# 接收的输入格式以 G(B)/g/M(B)/m/K(B)/k/B 结尾作为单位。如果您输入一个不带单位的整数,它的单位会被认为是 B(Byte)。
# 默认值:20 MB
systemReservedBandwidth: 20M
# CDN 可以使用的最大网络带宽
# 接收的输入格式以 G(B)/g/M(B)/m/K(B)/k/B 结尾作为单位。如果您输入一个不带单位的整数,它的单位会被认为是 B(Byte)。
# 默认值:1G
maxBandwidth: 1G
# CDN 暴露给 p2p 网络中的其他 peer 的 IP 地址
# 默认值:首个非本地回环IP。
advertiseIP:
# CDN 请求某个 URL 失败后,不再对该 URL 发起请求的时间间隔长度
# 换句话说,如果一个回源下载任务失败了,在这段时间里它将不会被重试。
# 默认值:3m
failAccessInterval: 3m
# CDN 启动后到启动第一次垃圾回收的时间间隔
# 默认值:6s
gcInitialDelay: 6s
# 进行元数据信息回收的时间间隔
# 每隔一个该时间间隔,CDN 就会启动一次元数据信息回收。
# 默认值:2m0s
gcMetaInterval: 2m
# 任务失效时间
# 如果一个任务的信息距离上次访问过去了一个该时间间隔,该任务信息将被认为已经失效。
# 默认值:3m0s
taskExpireTime: 3m
# CDN 使用的存储插件,可选[disk/hybrid]。disk 完全使用硬盘存储,hybrid 同时使用内存和硬盘进行存储。
# 默认值:disk
storageMode: disk
# CDN 连接的 manager,可以不指定。
# 各项配置默认值如下。如果 addr 为空字符串,CDN将不会连接manager。
manager:
addr: ""
cdnClusterID: 0
keepAlive:
interval: 5s
# 主机信息
host:
# 地理位置
location: ""
# IDC(Internet Data Center),互联网数据中心
idc: ""
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
# 是否在控制台程序中显示日志
# 默认值:false
console: false
# 是否使用调试级别的日志、是否启用 pprof
# 默认值:false
verbose: false
# pprof 监听的端口,仅在 verbose 为 true 时可用
# 默认值:-1(表示不启动),为 0 时使用随机值
pprofPort: -1
# jaeger 地址
# 默认使用空字符串(不配置 jaeger), 例如: http://jaeger.dragonfly.svc:14268/api/traces
jaeger: ""
# tracer 中使用的 service-name
# 默认值:dragonfly-cdn
service-name: dragonfly-cdn