Migrating 23TB from S3 to B2 in 7 hours
nodecraft.com
nodecraft.com
https://aws.amazon.com/s3/pricing/
I'd be pretty nervous about hitting the delete button after the data transfer.
Yes, one of them is more expensive.
I'm not saying AWS doesn't offer anything over bare servers, but do people think it's a Hubble to their home printers?
Recently I have moved my infra to a more hybrid architecture where all complex services run on major cloud providers while stateless compute services run on a cheap vultr vms. Result is quite nice!
1. Spin up 50 AWS Lightsail instances[0] for parallelism
2. In each instance download from S3 and upload to B2.
S3 to any AWS service in the same region is free[1]. $5 Lightsail instances come with 2TB of data transfers each, so 50 of them can easily handle 23TB. The whole transfer can be done within a few hours so the total computing cost is less than $10 ($5 / 30 * 50 = $8.3). Total data retrieval cost for S3 is ($0.0007 per GB) * 23,000GB = $16.1.
[0] https://aws.amazon.com/lightsail
[1] "Transfers between S3 buckets or from Amazon S3 to any service(s) within the same AWS Region are free." according to https://aws.amazon.com/s3/pricing/
If you had a partitioned list of what you needed to move per node, so that coordination was minimal between them, this would be pretty viable.
The stated reason for these limits is to avoid unexpectedly large bills. But I suspect that it's also to prevent crazy-ass strategies for getting around bandwidth costs.
[1] - https://docs.aws.amazon.com/snowball/latest/ug/create-export...
[2] - https://help.backblaze.com/hc/en-us/articles/360001918654
If we were to consider another large migration like this, physical media would probably be the way to go.
So, snowball works in a lot of area, but like so many AWS products, it works if you adapt to it.
pigz/scp/zstd works extremely fast in line.
In your case you're pulling from S3 to another object store.
I moved ~1PB from one S3 region to another. "Why not use replication," they asked. That only works if it's turned on when you upload the object - another fine-print 'gotcha' in the easy AWS service. Then you get into rate-limits. In 2010 I asked AWS if I could spin up 1000 servers to test something - nope - elastiticy at that level is for the big boys.
Now I work for a large cloud company and we still run into elasticity.
To move the 1PB from one S3 region to another we spun up hundreds of spot instances (oh, we were compressing and glacierizing it too) and built a perl/mysql batch job "s3 get | zstd | s3 put" process and parallelized it. One thing nice about S3 is it pulls the md5 hash - unless multipart, in which case it's the hash of the hash, oh yeah.... So you should split it in advance if you want to verify the hash (more fine print).
Worked great. Good for you for sharing this project, very cool.
I can confirm this, to some degree.
We have larger customers with 20 or 40 or 80 TB of data to bring into rsync.net and everyone is always very interested in physical delivery, which we offer, but it's always easier to nurse along a 20-30 day transfer than ship JBODs around.
As long as you have a transfer mechanism that can be resumed efficiently (such as zfs send) and you don't have terribly bad bandwidth, we always counsel to just run the very long transfer. It does help that we are inside he.net in one location and two hops away from their core in two other locations and we can just order 10gb circuits on a days notice ... because he.net rocks.
E.g. compare a soap bubble versus a bubble gum bubble. It's a lot easier to scale up the soap bubble, which is not elastic.
Moreover it turns out that elasticity is a very valuable quality of a cluster for most workloads; we want this intuition to be true, that our cluster meets resistance as it grows, in the sense that it will shrink when the workload decreases. This matches our economic intuition, too. We want this so much we have to build another software layer to make this happen - e.g., k8s.
During the transfer, the AWS sync constantly failed due to random issues which drove up the total time to transfer the files. Something like having a tilde (~) in the filename will totally break the sync. You really need to keep track of where it failed. We were constantly trying to craft additional rules into our sync logic to catch the 'gotchas'.
Another point you alluded to was the Etag/MD5sum that's stored in AWS. Pretty useful if you know how to use it...
https://www.backblaze.com/b2/cloud-storage-pricing.html
It appears to be an S3 clone. Competing via lower price and less micro charges. Highlights compared to Digital Ocean and Wasabi:
DO/Wasabi: minimum $5/month, but great deals compared to AWS/GCE otherwise.
B2: First 10GB storage free (probably not including bandwidth).
For a side project or startup looking for its first storage option, B2 seems compelling. But something important: is it a drop in replacement? Is the api accessible on your platform?
https://help.backblaze.com/hc/en-us/articles/218513487-Is-th...
I don't have a clear answer right now, but when I get closer to deploying my current side project, it's something I'll take a deeper look into.
They have 1GB free of outgoing bandwidth per day. If you put them behind Cloudflare then you effectively get your bandwidth for free. So half a cent per GB per month is all you way. Plus your time building out the integration instead of S3.
Cloudflare is betting on most of their customers serving HTML not large uncachable blobs, that "Bandwidth Alliance" will disappear pretty quickly at any sort of scale.
They also have different billing models with a free egress plan if you aren't downloading data that often.
Glacier is already cheaper than B2 and has the advantage of storing data redundantly across datacenters. And glacier deep archive is 4 times cheaper than that.
Full disclosure: AWS employee
You are probably using it wrong.
S3 storage is redundant over an entire region. Entire availability zones can go down (extremely improbable) without your data being put at risk.
It, therefore, struck me as odd to see:
> Due to S3 and B2 being at least nearly equally* accessible, reliable, available, as well as many other providers, our primary reason for moving our backups now became pricing.
but then ...
> * Science is hard, blue keys on calculators are tricky, and we don’t have years to study things before doing them
WTF? They're trying to be joking here I hope, but that comes across somewhat "We don't give a crap about our customer's data".
I was trying to interject some humor into a dry process. When I asked a couple peers from my storage background, "how would you do this project" they both said the same thing: 1) form a working group 2) do a study 3) test 4) 90 days later, do an analysis. Epic process.
We care a lot, but that's beyond our scope. This was an all-hands reviewed process, and like machines that are built to be ultimately reliable including: hospital generators, human-rated spacecraft equipment, airplane engines for single-engine remote location flying (PT6), our process was detuned speed-wise specifically, for overall service reliability and minimal impact.
We tested, we analyzed, we saw weird failures (python core dump?) in simple code, and followed up on all of those before proceeding. We agonized.
In the end we were satisfied, because our customers couldn't tell anything changed, and our CSR's got zero new tickets. Not bragging at all, relieved of course, but, we care about the CSR's load and work experience too.
Thanks for checking the article out, and let me know if we can show you more about our service.
I understand your main concern for moving was pricing. Developer hours also cost money. It seems like you had to invest much more developer hours than you would have if you gradually moved over the course of one month or so. (probably a week?)
There are of course significantly faster and more efficient compression formats like LZ4 which would be ideal if we were solely using the data internally in managed environments, but we offer these backups as downloads to our users, some of which aren't very technically inclined and still need to be able to access the files easily.
It's not a deal-breaker for us, but we're very much looking forward to when they can support more regions.