Store TONS of Image Files With Weed-FS, a Simple and Highly Scalable Distributed File System
Last Edited: 01/03/2013
There are problems with storing tons of image files in a single folder. For one, there is a limit on the number of images you can have in one folder, second working with that folder is going to be a nightmare when it grows to be enormous.
I found Weed-FS and I am very impressed with it's ease of use, and the project's inspiration itself. It's based off of Facebook's image storage, and coded with storing billions of images in mind. Another interesting fact is this project is done in golang, which admittedly I didn't know existed.
With Weed-FS, you run a master server, which stores the locations where each file is stored, and volume servers, which handle the requests for storing and retrieving images. This allows you to very effectively distribute the load across many volume servers if you need to.
Weed-FS has sophisticated replication, which is rack and data center aware. Replication can be defined both when you start your master server, OR when you store you image! Tons of flexibility, yet a very simple api
The fact that you can store multiple files under a single file id is great as well. This is very intuitive for thumbnails of images, and it saves you from assigning more ids.
For those interested, I have created a php client for weed-fs, I called it WeedPhp, which has most of the REST calls as functions. Additionally I made a Symfony 2.1 bundle, called WeedPhpBundle, which abstracts Weed-FS to: store, retrieve, delete.
Weed-FS is great, and is such a young project. I am eager to see the development in the future.