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 Container | 847 | 668 | 1915 |
Upload 7Kb file | 83 | 92 | 230 |
List Blobs (1) | 40 | 172 | 51 |
Delete Blob | 47 | 35 | 112 |
Delete Container | 240 | 45 | 68 |
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.