FASTDFS configuration, deployment and API usage interpretation (5) Fastdfs configuration detailed tracker configuration (RPM)

Source: Internet
Author: User

This article is a detailed introduction to the tracker.conf configuration file.

1 Basic Configuration Disable
#func:配置是否生效#valu:true、falsedisable=false
Bind_addr
#func:绑定IP#valu:IP地址bind_addr=192.168.6.102
Port
#func:服务端口#valu:端口整数值port=22122
Connect_timeout
#func:连接超时#valu:秒单位正整数值connect_timeout=30
Network_timeout
#func:网络超时#valu:秒单位正整数值network_timeout=60
Base_path
#func:Tracker数据/日志目录地址#valu:路径base_path=/home/michael/fdfs/base4tracker
Max_connections
#func:最大连接数#valu:正整数值max_connections=256
Work_threads
#func:线程数,通常设置CPU数#valu:正整数值work_threads=4
Store_lookup
#func:上传文件的选组方式。#valu:0、1或2。# 0:表示轮询# 1:表示指定组# 2:表示存储负载均衡(选择剩余空间最大的组)store_lookup=2
Store_group
#func:指定上传的组,如果在应用层指定了具体的组,那么这个参数将不会起效。另外如果store_lookup如果是0或2,则此参数无效。#valu:group1等store_group=group1
Store_server
#func:上传服务器的选择方式。(一个文件被上传后,这个storage server就相当于这个文件的storage server源,会对同组的storage server推送这个文件达到同步效果)#valu:0、1或2# 0: 轮询方式(默认)# 1: 根据ip 地址进行排序选择第一个服务器(IP地址最小者)# 2: 根据优先级进行排序(上传优先级由storage server来设置,参数名为upload_priority),优先级值越小优先级越高。store_server=0
Store_path
#func:上传路径的选择方式。storage server可以有多个存放文件的base path(可以理解为多个磁盘)。#valu:# 0: 轮流方式,多个目录依次存放文件# 2: 存储负载均衡。选择剩余空间最大的目录存放文件(注意:剩余磁盘空间是动态的,因此存储到的目录或磁盘可能也是变化的)store_path=0
Download_server
#func:下载服务器的选择方式。#valu:# 0:轮询(默认)# 1:IP最小者# 2:优先级排序(值最小的,优先级最高。)download_server=0
Reserved_storage_space
#func:保留空间值。如果某个组中的某个服务器的剩余自由空间小于设定值,则文件不会被上传到这个组。#valu:# G or g for gigabyte# M or m for megabyte# K or k for kilobytereserved_storage_space=1GB
Log_level
#func:日志级别#valu:# emerg for emergency# alert# crit for critical# error# warn for warning# notice# info for information# debug for debugginglog_level=info
Run_by_group/run_by_user
#func:指定运行该程序的用户组#valu:用户组名或空run_by_group=#func:#valu:run_by_user=
Allow_hosts
#func:可以连接到tracker server的ip范围。可设定多个值。#valuallow_hosts=
Check_active_interval
#func:检测 storage server 存活的时间隔,单位为秒。#      storage server定期向tracker server 发心跳,#      如果tracker server在一个check_active_interval内还没有收到storage server的一次心跳,#      那边将认为该storage server已经下线。所以本参数值必须大于storage server配置的心跳时间间隔。#      通常配置为storage server心跳时间间隔的2倍或3倍。check_active_interval=120
Thread_stack_size
#func:设定线程栈的大小。 线程栈越大,一个线程占用的系统资源就越多。#      如果要启动更多的线程(V1.x对应的参数为max_connections,V2.0为work_threads),可以适当降低本参数值。#valu:如64KB,默认值为64,tracker server线程栈不应小于64KBthread_stack_size=64KB
Storage_ip_changed_auto_adjust
#func:这个参数控制当storage server IP地址改变时,集群是否自动调整。注:只有在storage server进程重启时才完成自动调整。#valu:true或falsestorage_ip_changed_auto_adjust=true
2 Synchronous Storage_sync_file_max_delay
#func:同组storage服务器之间同步的最大延迟时间。存储服务器之间同步文件的最大延迟时间,根据实际情况进行调整#valu:秒为单位,默认值为1天(24*3600)#sinc:v2.0storage_sync_file_max_delay=86400
Storage_sync_file_max_time
#func:存储服务器同步一个文件需要消耗的最大时间,缺省为300s,即5分钟。#sinc:v2.0storage_sync_file_max_time=300
Sync_log_buff_interval
#func:同步或刷新日志信息到硬盘的时间间隔。注意:tracker server 的日志不是时时写硬盘的,而是先写内存。#valu:以秒为单位sync_log_buff_interval=10
3 Trunks and Slots
#func:是否使用trunk文件来存储几个小文件#valu:true或false#sinc:v3.0use_trunk_file=false#func:最小slot大小#valu:<= 4KB,默认为256字节#sinc:v3.0slot_min_size=256#func:最大slot大小#valu:>= slot_min_size,当小于这个值的时候就存储到trunk file中。默认为16MB。#sinc:v3.0slot_max_size=16MB#func:trunk file的size#valu:>= 4MB,默认为64MB#sinc:v3.0trunk_file_size=64MB
4 HTTP-related whether HTTP is enabled
#func:HTTP是否生效#valu:true或falsehttp.disabled=false
HTTP Server port number
#func:tracker server上的http port#valu:#note:只有http.disabled=false时才生效http.server_port=7271
Check the time interval for storage survival (heartbeat detection)
#func:检查storage http server存活的间隔时间#valu:单位为秒#note:只有http.disabled=false时才生效http.check_alive_interval=30
Protocol mode used by heartbeat detection
#func:检查storage http server存活的方式#valu:# tcp:连接到storage server的http端口,不进行request和response。# http:storage check alive url must return http status 200.#note:只有http.disabled=false时才生效http.check_alive_type=tcp
Check the URI of the Storage state
#func:检查storage http server是否alive的uri/url#note:只有http.disabled=false时才生效http.check_alive_uri=/status.html
Need_find_content_type
#func:if need find content type form file extension name#note:只有http.disabled=false时才生效http.need_find_content_type=true
HTTP configuration file
#func:”#include http.conf“表示redirect to include other settings#include http.conf

-

FASTDFS configuration, deployment and API usage interpretation (5) Fastdfs configuration detailed tracker configuration (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.