Storage Policies Coming to OpenStack Swift
The good folks at OpenStack recently announced two big new features in Swift for the Juno time frame: Storage Policies and Erase Codes. These new features are going to improve the accessibility that functionability of Swift. Here is all you need to know about these new features:
With Storage Policies, users can now select the set of disks that best suite their needs. For example, suppose the Swift Admin defines a Storage Policy for SSD disks. Users could specify this Storage Policy for objects that need rapid access.
Internally, a Storage Policy maps a set of disks in the Swift cluster to the Storage Policy’s name. It is up to the Swift Administrator to define the mapping and the names. The Administrator then tells the users about the various Storage Policies that are available and what they do.
Swift stores objects in containers. When a programmer creates a container, he can specify its Storage policy. All objects created in that container will then be located on the disks for that Policy.
There are many use cases for Storage Policies. For example, you could use Storage Policies to constrain data to certain geographical regions for, say, regulatory compliance. You might have a Storage Policy for self-encrypting drives (SED) that offer more secure storage for sensitive data. You can also have Storage Policies that use different Replica counts. If you have data that you can afford to lose, you might a Storage Policy with a Replica count of 2 or even 1.
The second big announcement was Swift support for Erasure Codes.
Previously, Swift only supported Replicas to recover from failures. Each blob of data was typically written to three different disks. With Erasure Codes (EC), you can reduce the storage you use. The data is encoded and decoded transparently on the Swift proxy nodes. When a failure happens, the missing data is recovered from the surviving encoded chunks.
Erasure codes do come at a price, though. They use more processing power on the proxy nodes than Replicas. Internally, Swift has to make more network connections when using Erase Codes, since the chunks are more spread out than Replicas.
One nice feature is that a single Swift cluster can support both Replicas and Erasure Codes. You just specify which one you want in a Storage Policy.
You can read more about these new features in the this OpenStack SuperUser article. Joe Arnold also has a nice blog entry describing Swift Erase Codes in more technical detail. The Juno release is October 2014, so the features should be generally available then.