On this page
Classes and Containers
Containers
A container is an instance of a service. It is a place to store files. Configuration is service-specific, e.g. a filesystem container needs to know the directory where the files should go; an S3 container needs account credentials along with the bucket name.
It is crucial that more than one site does not consider itself to be the owner of a container. For example, if you duplicated a live site with an S3 container onto a local development environment. Later, a node was deleted from the local site; files are removed that were owned by this node in the S3 container that the live site is using. The easiest way to mitigate this problem is to edit the S3 container on the local site and mark it as "External". Marking as external means that the local site does not have write access to the container.
Multiple containers can be created for a single class. This feature allows for you to store data duplicated in multiple locations for redundancy. A priority can be placed on the containers, i.e. if you want fast access, you can create a file system container setting it at the priority then add a cloud file storage container for data resilience. See below regarding container prioritization.
Classes
A class is a prioritised list of containers. Storage API works to propagate files to every container in their class through Cron. If a file is fully propagated, then any instances of the file in containers not in the class are deleted, e.g. if a container has been removed from the class.
Files are served from the highest priority serving container that has the file.
Classes have configured an "initial container". This container is where files are stored first when added to the class. From here they are propagated to other containers. If the initial container is not listed as a container in the class, then file instances in the container are deleted once the file has been fully propagated to all containers in the class.
Examples of classes might be:
- Session - just has a local filesystem container to store files temporarily.
- User - contains Rackspace and S3 containers for maximum protection from data loss.
- Thumbnails - has the local filesystem container as its initial container, but only has a reduced redundancy S3 container in the class. This example means that files can be generated and served quickly, but they are only stored permanently on S3. Cheaper reduced redundancy containers can be used because the files can be regenerated.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion