Tracker configuration tutorial in CentOS Fastdfs

Source: Internet
Author: User
Tags time interval centos server port

This article is a detailed description of the tracker.conf configuration file.

1 Basic Configuration

Disable
#func: Does the configuration take effect
#valu: True, False
Disable=false

Bind_addr
#func: Binding IP
#valu: IP Address
bind_addr=192.168.10.11

Port
#func: Service Port
#valu: Port integer value
port=22122

Connect_timeout
#func: Connection Timeout
#valu: Second unit positive integer value
Connect_timeout=30

Network_timeout
#func: Network timeout
#valu: Second unit positive integer value
Network_timeout=60

Base_path
#func: Tracker Data/log directory address
#valu: Path
Base_path=/rekfan.com/fastdfs_data

Max_connections
#func: Maximum number of connections
#valu: Positive integer value
max_connections=256

Work_threads
#func: Number of threads, typically set the number of CPUs
#valu: Positive integer value
Work_threads=4

Store_lookup
#func: Select the way to upload files.
#valu: 0, 1 or 2.
# 0: Polling
# 1: Indicates the specified group
# 2: Represents Storage load Balancing (select the group with the largest remaining space)
store_lookup=2

Store_group
#func: Specifies which groups to upload, and if specific groups are specified at the application level, this parameter will not work. In addition, if Store_lookup is 0 or 2, this parameter is invalid.
#valu: group1 etc.
Store_group=group1

Store_server
#func: How to choose the server to upload. (After a file is uploaded, this storage server is equivalent to the storage server source of this file, will be pushed to the same group of storage server to achieve the synchronization effect)
#valu: 0, 1 or 2
# 0: Polling mode (default)
# 1: Sorting by IP address Select the first server (the least IP address)
# 2: Sort by priority (the upload priority is set by the storage server, the parameter is named Upload_priority), the smaller the priority value, the higher the priority level.
Store_server=0

Store_path
#func: The way to choose the upload path. Storage server can have multiple base path (which can be understood as multiple disks) that holds files.
#valu:
# 0: Alternate way, multiple directories in sequence to store files
# 2: Storage load balancing. Select the largest directory to store the remaining space (note: The remaining disk space is dynamic, so stored directories or disks may also change)
Store_path=0

Download_server
#func: Download the server selection method.
#valu:
# 0: Polling (default)
# 1:ip the smallest of them
# 2: Priority order (lowest value, highest priority.) )
Download_server=0

Reserved_storage_space
#func: Preserves space values. If the remaining free space of one of the servers in a group is less than the set value, the file is not uploaded to this group.
#valu:
# G or G for gigabyte
# m or M for megabyte
# K or K for Kilobyte
Reserved_storage_space=1gb

Log_level
#func: Log Level
#valu:
# Emerg for emergency
# Alert
# Crit for Critical
# error
# Warn for warning
# Notice
# Info For information
# Debug for debugging
Log_level=info

Run_by_group/run_by_user
#func: Specifies the group of users running the program
#valu: User group name or null
run_by_group=

#func:
#valu:
Run_by_user=

Allow_hosts
#func: You can connect to the IP range of tracker server. Multiple values can be set.
#valu
allow_hosts=

Check_active_interval
#func: Detects the storage server's surviving time in seconds.
# Storage server regularly sends a heartbeat to tracker server,
# if Tracker server has not received a heartbeat in the storage server within a check_active_interval,
# There will be a thought that the storage server is offline. Therefore, the value of this parameter must be greater than the heartbeat interval configured by the storage server.
# is typically configured to be twice times or 3 times times the storage server heartbeat interval.
check_active_interval=120

Thread_stack_size
#func: Set the stacks size of the line. The larger the line stacks, the more system resources a thread occupies.
# If you want to start more threads (v1.x the corresponding parameter is max_connections,v2.0 to Work_threads), you can reduce the value of this parameter appropriately.
#valu: such as 64KB, the default is 64,tracker server thread stack should not be less than 64KB
thread_stack_size=64kb

Storage_ip_changed_auto_adjust
#func: This parameter controls whether the cluster automatically adjusts when the storage server IP address changes. Note: Automatic tuning is only completed when the storage server process restarts.
#valu: TRUE or False
Storage_ip_changed_auto_adjust=true

2 Sync

Storage_sync_file_max_delay
#func: The maximum latency for synchronization between storage servers in the same group. Maximum latency for synchronizing files between storage servers, adjusted to the actual situation
#valu: Seconds, default value is 1 days (24*3600)
#sinc: v2.0
storage_sync_file_max_delay=86400

Storage_sync_file_max_time
#func: The maximum time the storage server needs to synchronize a file is 300s, or 5 minutes.
#sinc: v2.0
storage_sync_file_max_time=300

Sync_log_buff_interval
#func: The time interval at which log information is synchronized or refreshed to the hard disk. Note: The Log for tracker server is not always written to the hard drive, but to write memory first.
#valu: In seconds
sync_log_buff_interval=10

3 Trunk and slot
#func: Whether to use a trunk file to store several small files
#valu: TRUE or False
#sinc: v3.0
Use_trunk_file=false

#func: Minimum slot size
#valu: <= 4KB, defaults to 256 bytes
#sinc: v3.0
slot_min_size=256

#func: Maximum slot size
#valu: >= slot_min_size is stored in trunk file when it is less than this value. The default is 16MB.
#sinc: v3.0
slot_max_size=16mb

#func: size of trunk file
#valu: >= 4MB, default to 64MB
#sinc: v3.0
Trunk_file_size=64mb

4 HTTP-related

Whether to enable HTTP
#func: Does http take effect
#valu: TRUE or False
Http.disabled=false

HTTP Server port number
#func: HTTP port on tracker server
#valu:
#note: only effective when http.disabled=false
http.server_port=7271

Check the interval between storage survival (heartbeat detection)
#func: Check the storage HTTP server's surviving interval
#valu: Unit is seconds
#note: only effective when http.disabled=false
Http.check_alive_interval=30

The protocol used for heartbeat detection
#func: Check the way storage HTTP server survives
#valu:
# TCP: HTTP ports that are connected to the storage server without request and response.
# http:storage Check Alive URL must return HTTP status 200.
#note: only effective when http.disabled=false
Http.check_alive_type=tcp

Check the URI of the Storage state
#func: Check if the storage HTTP server is alive Uri/url
#note: only effective when http.disabled=false
Http.check_alive_uri=/status.html

Need_find_content_type
#func: If need Find content type form file extension name
#note: only effective when http.disabled=false
Http.need_find_content_type=true

HTTP configuration file
#func: "#include http.conf" means redirect to include other settings
#include http.conf

Related Article

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.