What is Fastdfs
Fastdfs is an open source Distributed file system written in C language. Fastdfs for the Internet, fully consider the redundant backup, load balancing, linear expansion and other mechanisms, and pay attention to high availability, high performance and other indicators, the use of Fastdfs easily set up a high-performance file server cluster to provide file upload, download and other services.
File upload Process
File download Process
File name for uploading files
After the client uploads the file, the storage server returns the file ID to the client, which is used for subsequent access to the file's index information. File index information includes: Group name, virtual disk path, data level two directory, file name.
Group name: The name of the storage group where the file was uploaded, and the storage server returns after the file upload is successful, which requires the client to save itself.
Virtual Disk path: The virtual path of the storage configuration, corresponding to the disk options store_path*. If Store_path0 is configured, it is M00, if STORE_PATH1 is configured M01, and so on.
Data Level Two directory: A level two directory created by the storage server under each virtual disk path for storing data files.
File name: Different than when uploading files. is generated by the storage server based on specific information, including information such as the source storage server IP address, file creation timestamp, file size, random number, and file name extension.
Summary:
A separately deployed file server is an essential part of an Internet project. Simple words can use FTP as a file server, but the number of project visits continues to increase, it is necessary to consider the scalability of the file server and high availability. It is wise to use Fastdfs at this time, and when the server capacity is not enough, Fastdfs can quickly expand linearly.