This article summarizes FastDFS clustering and load balancing.

###What did you do today

FastDFS is tailored for the Internet, taking into account redundant backup, load balancing, linear expansion and other mechanisms, and focusing on high availability and high performance. Using FastDFS, you can build a high-performance file server cluster to provide file and download services.

  • The Client accesses the FastDFS cluster service, and Tracker is responsible for coordinating the interaction between Client and Stroage. For high availability, we cluster Tracker. Storage is used to store files in groups with multiple devices in each group. For high availability, we cluster storage.

  • The storage reports back to the tracker cluster, telling the tracker how much free space it has, which locations are free, and so on.

  • When a client uploads a picture, it first asks the Tracker. The Tracker tells the client which storage is currently free and returns the IP address and port number. The client uploads the image directly to the storage. After the storage saves the image, the storage tells the tracker how much free space it has and which locations are free. After the information is displayed, the storage returns the address of the image stored on the server to the client.

  • The client asks the tracker for the stroage of the downloaded file. The parameters are the volume name and file name. The tracker returns an available storage, and the client communicates with the storage to download the file.

  • Let’s now draw our own FastDFS cluster diagram.


###Summary

End of FastDFS, learn about Zookeeper.