In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article analyzes "how to understand FastDFS distributed file systems". The content is detailed and easy to understand. Friends who are interested in "how to understand the FastDFS distributed file system" can follow the editor's idea to read it slowly and deeply. I hope it will be helpful to you after reading. Let's learn more about "how to understand FastDFS distributed file systems" with the editor.
As a well-known system-level open source software in China, FastDFS distributed file system makes our work more efficient and concise. How much do you know about the FastDFS distributed file system? Now, the editor will explain the FastDFS distributed file system in detail.
A brief introduction to FastDFS
The solution provided by FastDFS is to introduce a tracking server (tracker server), which is used to record the storage server information in each group, and the storage information is actively returned to the tracker by each storage. With this information, tracker can do the scheduling work, see who has more storage space, and put the files there.
Second, the characteristics of FastDFS
Groups are independent of each other.
Storage server in the same group needs to back up each other.
After the files are stored in a storage, they need to be backed up to another server.
There is no interaction between tracker
Each storgae server needs to actively report information to all tracker.
Tracker and tracker do not know each other's existence.
Third, how to upload files
For ease of understanding, it is assumed that the uploaded file is: = = Group1/M00/00/0C/wKjGgVgbV2-ABdo-AAAAHw.jpg== first client sends upload link request to tracker, then tracker dispatches it to query the available storage, and sends the ip and port corresponding to the storgae to client; to get the storage server information. Client can upload the file directly to storage. Storage will generate a new file name and write it to disk, and then return the new file information to client,client and finally save the file information locally. It is important to note that storage regularly reports information to tracker.
IV. Other FastDFS content
Prevent chain theft
In order to prevent hard-uploaded files from being stolen by others, you can solve this problem by setting token for URL. The anti-hotlink configuration of FastDFS is as follows:
# whether to check tokrn. The default is false.
Http.anti\ _ steal.check\ _ token=true
# valid duration / second for generating token
Http.anti\ _ steal.token\ _ ttl=900
# generate the key of token and set it as long as possible
Http.anti\ _ steal.secret\ _ key=@#$%\ * + &! ~
FastDFS generates token policy as follows: token = md5 (file name, key, timestamp)
The mechanism of storage consolidation will not be discussed in depth here, because it brings a series of new problems, such as the need to record not only the names of large files, but also the names of small files during synchronization, which suddenly becomes much more troublesome. Originally, free space management can be calculated directly through the operating system, but now it is not possible, because a 64m block is created, and there is still free space in this block, which is very troublesome to calculate.
On how to understand the FastDFS distributed file system to share here, I hope that the above content can make you improve. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.