Saturday 13 June 2020

API Head-to-head Update : AWS S3 Vs Windows Azure Table Storage Vs Rackspace Cloud Files

This is an update to my last API head to head from August 2014, I'm nothing if not consistent with my inconsistent posting. I've recently changed jobs to a new company that is moving to Azure but has some legacy Rackspace assets, so I thought it'd be fun to redo the test with Rackspace added. Worth noting that the Rackspace support for C# is completely non-existent. The official Rackspace SDK hasn't been updated since 2013 and this test is using the openstack.net SDK which hasn't been updated since 2018.

The code

Initialise Provider

CloudIdentity cloudIdentity = new CloudIdentity()
{
 APIKey = "mykey",
 Username = "myusername"
};
var provider = new CloudFilesProvider(cloudIdentity);

Create container

provider.CreateContainer(containerName);

Upload file

provider.CreateObjectFromFile(containerName, testFile, blobName);

List Blobs (objects in Rackspace parlance)

provider.ListObjects(containerName).ToList();

Delete file

provider.DeleteObject(containerName, blobName);

Delete container

provider.DeleteContainer(containerName);
Can't argue with the simplicity of the code, once you've initialised the provider, everything is one line.

The results

Worth noting that I don't have the original test file, so the file being uploaded here is one I happened to have lying around of this guy. It is only 1k larger, so don't expect it will have a massive effect on the results.
Operation S3 Azure Rackspace
Create Container8476681915
Upload 7Kb file8392230
List Blobs (1)4017251
Delete Blob4735112
Delete Container2404568
I ran the tests a few times and the numbers fluctuated but the positions pretty much stayed the same, except the Upload file winner switched between S3 and Azure.

Conclusion

Rackspace was slowest, but that isn't terribly surprising considering I was using a third-party 2-year old library, it isn't necessarily a realistic comparison, just for my own amusement.