Given that most web applications need to store files generated or uploaded by users they require a place to store these files. Back in the old days such files have been put into the filesystem.
However, for redundant systems with multiple application server instances this is not an option. Because the instances can be spread over the whole network, they don’t share a common filesystem.
Services like NFS allow filesystem sharing but neither do they scale well nor are they very stable as they represent single point of failures (NFS). If an error occurs, there is no backup system to handle that and the whole storage system is not accesible for your applications.
While there are cumbersome ways to increase the availability of those servers, developers should prefer storage services that are easily scalable and highly available by design. Openstack Swift fulfills these requirements and it is a software system based on Open Source developments.
“A distributed object storage system designed to scale from a single machine to thousands of servers. Swift is optimized for multi-tenancy and high concurrency. Swift is ideal for backups, web and mobile content, and any other unstructured data that can grow without bound.
Swift provides a simple, REST-based API fully documented at http://doc.openstack.org/.
Swift was originally developed as the basis for Rackspace’s Cloud Files and was open-sourced in 2010 as part of the OpenStack project.”
Openstack Swift provides mechanisms to guarantee the availability of your files at any time. Even if a storage instance encounters an error, the system is able to handle it and direct your file requests to a redundant copy of the required files. If your storage demands increase over time, it is easy to provide further space for your files. In addition Swift provides a REST api for accessing your files from the Internet and it enables you to put your files in public or private buckets. This offers many usage scenarios for storing and accessing your files from within or outside your web app.
The only obstacle for using Swift is the installation and operation of your own Openstack Swift service. Setting up an OpenStack Swift cluster is not a trivial task because it consists of a number of services that need to be maintained by an experienced administrator.
Good news everyone!
We have integrated an OpenStack Swift service with anyines for you.
You, as a developer, can now use Swift out of the box. No setup required. No worries about complicated server installations.
Just create a Swift service using the cf command and you are ready to go!
You can find all information you need in our tutorial on how to use the anynines Swift service for managing files from within your web apps.