12 ms·
Cloudflare Sippy: Incrementally Migrate Data from AWS S3 to Reduce Egress Fees
- yieldcrv 3y agovampire attack, nice
- hirako2000 3y agoVampire hunter attack, nicer.
- figassis 3y agoThis is amazing. I’m thinking of building the same thing for self hosted S3 (ie. Minio). I love AWS, they're very reliable and i feel like depending on them is not risky. But being 100% dependent on a single provider scares me a lot, and I often feel like S3 is the one thing that would cost me a lot if I tried to migrate. I have not accounted for all the data I have there, but it's lots of small files (all the user uploads), and what scares me is the per request cost of deletion (I think I read some horror story here sometime ago). So I keep pushing this off.
- supriyo-biswas 3y agoDeletions do not encounter costs, but obtaining a list of objects in order to delete them certainly does.
- albert_e 3y agoBulk deletes on S3 should be done using a Life Cycle Policy to avoid the per object delete cost
- toomuchtodo 3y agoDeletes are free, but you have to pay to list to delete if not individually tracking.
- ludjer 3y agoTurn on weekly manifest to get a list of files and then you can delete based off that. Much faster and better then listing billions of files.
- HatchedLake721 3y agoWhat’s a weekly manifest?
- uw_rob 3y agoI believe ludjer is referring to S3 Storage Inventory. This is a daily, or weekly, file produced containing metadata on every file within a S3 Bucket. It does not use the synchronous List APIs. > You can use Amazon S3 Inventory to help manage your storage. For example, you can use it to audit and report on the replication and encryption status of your objects for business, compliance, and regulatory needs. You can also simplify and speed up business workflows and big data jobs by using Amazon S3 Inventory, which provides a scheduled alternative to the Amazon S3 synchronous List API operations. Amazon S3 Inventory does not use the List API operations to audit your objects and does not affect the request rate of your bucket. > > Amazon S3 Inventory provides comma-separated values (CSV), Apache optimized row columnar (ORC) or Apache Parquet output files that list your objects and their corresponding metadata on a daily or weekly basis for an S3 bucket or objects with a shared prefix (that is, objects that have names that begin with a common string). If you set up a weekly inventory, a report is generated every Sunday (UTC time zone) after the initial report. For information about Amazon S3 Inventory pricing, see Amazon S3 pricing. https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html https://docs.aws.amazon.com/AmazonS3/latest/userguide/storag...
- orf 3y agoIgnore the replies about inventories. $0.005 Per 1k list requests. A list request returns 1k items. 1 million items for $0.005, or 1 billion items for 5 dollars. Still use lifecycle policies (I visualized how it ages out 1 billion items here[1]), but list request prices are not a factor worth mentioning. 1. https://tomforb.es/visualizing-how-s3-deletes-1-billion-objects-with-athena-and-rust/ https://tomforb.es/visualizing-how-s3-deletes-1-billion-obje...
- ericpauley 3y agoThis (although as others said it’s the list cost, not the delete). If you want to nuke a bucket don’t waste your time with the API and just age the files out. I’ve done this with buckets with tens of millions of files and five minute’s work.
- albert_e 3y agoBoth list objects and delete object are API actions that incur the standard cost for "requests" ... isn't it? >> PUT, COPY, POST, LIST requests (per 1,000 requests) = $0.005 GET, SELECT, and all other requests (per 1,000 requests) = $0.0004 >> "You pay for requests made against your S3 buckets and objects. S3 request costs are based on the request type, and are charged on the quantity of requests as listed in the table below" https://aws.amazon.com/s3/pricing/#:~:text=You%20pay%20for%20requests%20made%20against%20your%20S3%20buckets%20and%20objects.%20S3%20request%20costs%20are%20based%20on%20the%20request%20type%2C%20and%20are%20charged%20on%20the%20quantity%20of%20requests%20as%20listed%20in%20the%20table%20below https://aws.amazon.com/s3/pricing/#:~:text=You%20pay%20for%2...
- ericpauley 3y agoFrom the same paragraph: “DELETE and CANCEL requests are free.”
- pzmarzly 3y agoIt's a seemingly simple and obvious way to lazily migrate your data, but if using Sippy means one less thing for the application code to worry about, and (I assume) is a free add-on, then it provides a ton of value. I have to admit that Cloudflare has been killing it recently with DevX / OpsX. If I wasn't against that company's role in modern internet (as a user of Tor, their firewall is annoying to no end), I would have tried them out already.
- Jamie9912 3y agoCloudflare doesn't hate Tor. Blocking Tor is purely a customer configuration
- superkuh 3y ago>Blocking Tor is purely a customer configuration ...that's on by default and so used by the vast majority of Cloudflare customers making it effectively a Cloudflare configuration.
- eddd-ddde 3y agoI'm pretty sure it is not on by default and cloudflare also provides onion routing by default so it even helps legitimate Tor users.
- superkuh 3y agoThey may not block them by "default" but when all the onion browsers automatically have a high threat score for not running cloudflare's invasive javascript it's the same thing. Especially combined with the high "threat score" they attribute to almost all out node IPs. I don't even use tor and they still block my browser when I'm trying to read science journal articles because my browser cannot run their bleeding edge features they use in their spying javascript. And everyone knows it because that's what the lived experience of trying to access cloudflare blocked sites on tor browser (or any other browser that's not made by a megacorp). It doesn't matter what cloudflare's intentionally ambiguous and probably disingenuous wording might try to imply. The only people who think otherwise have never actually tried using tor to surf the web.
- monlockandkey 3y agoWow this is really clever. Would be cool to have an open source data migrator with the same concept
- lhoff 3y agoThat thought was my first impression as well. However with a second thought i'm not sure if i'm convinced by the long time scenario that you would end up using this tool. After all it only makes sense to use this tool if you never intent to migrate the data completely. Which means, the data will till the end be scatered between AWS and Cloudflare with no apparent system other than the last access. Maybe I am overlooking something.
- NicoJuicy 3y agoNah. This is literally to have a migration path and to only occur once the Amazon eggres fees. At the end, you can still decide to migrate all data or to abandon the not-used-till-now data.
- lozenge 3y agoYes, it's free/very cheap to move S3 data to a tier like Infrequent Access or Glacier with lower monthly cost and higher retrieval cost.
- NicoJuicy 3y ago"higher retrieval costs" Getting that data is really high. It should only be used if you are sure it will never be accessed. I've read quite a few posts where they complained about the huge bill, when they needed to get their data... Not sure how it is right now, it's still obscure on their pricing page and before, you had to check the gotchas in their FAQ .
- supriyo-biswas 3y agoOriginal source: https://blog.cloudflare.com/sippy-incremental-migration-s3-r2/ https://blog.cloudflare.com/sippy-incremental-migration-s3-r...
- Ayesh 3y agoYeah the linked post is a bad rehash of the original blog post. Thanks for linking it.
- NicoJuicy 3y agoNot really. The submitted link shows you how to use it ( eg. The rest call). This one shows you how to set it up in cloudflare. While the info provided in both is indeed similar.
- dang 3y agoOk, we've changed to that from https://www.infoq.com/news/2023/10/cloudflare-sippy-migrate-s3/ https://www.infoq.com/news/2023/10/cloudflare-sippy-migrate-.... Thanks!
- quickthrower2 3y agofor the egregious egress fees
- Squarex 3y agoThey have no egress fees. https://developers.cloudflare.com/r2/pricing/ https://developers.cloudflare.com/r2/pricing/
- quickthrower2 3y agoI mean aws :-)
- KingLancelot 3y ago[dead]
- andrewstuart 3y ago9 cents a gigabyte downloaded versus 0 cents a gigabyte downloaded is a pretty good deal. There’s not much AWS can do about it because they must make untold billions from those sweet, sweet S3 egress fees. I’d be willing to bet S3 egress fees make up about 60% of all AWS revenue.
- cebert 3y agoI have to imagine CloudWatch makes AWS a lot of money too. Very often, when I look into an account from work that is spending a lot, CloudWatch is a large contributor.
- andrewstuart 3y agoAll the other parts of AWS are there really only to keep companies using S3.
- sofixa 3y agoReally? From Custom metrics, or logs? It's pretty rare that I hear anyone use it in production, there's usually either a SaaS like Datadog/New Relic or a homegrown setup with e.g. Prometheus.
- r3trohack3r 3y agoI had been running https://dockeri.co https://dockeri.co with https://arc.codes/ https://arc.codes/ for pennies a month. Then, one month, I got a ~$500 bill out of no where. Docker had changed an api causing my service to return 5xx errors all month. Each error was individually logged to CloudWatch - which racked up a ~$500 bill. I moved to Cloudflare Workers that day and haven’t moved back.
- NicoJuicy 3y agoLol. The Cloud really loves logging ( bills :p ). It would be nice if Cloudflare implemented "Open telemetry". It could reduce the cloud bill by at least 2. Logging is really expensive.
- Tempest8 3y agoThat's a smart way of doing it. Apt naming, too.
- mythz 3y agoCan definitely recommend Cloudflare R2, great value with no chance of any surprise egress fees. Our last month invoice was only $0.26 for 26GB+ of managed storage.
- Alifatisk 3y agoFeels like Cloudflare is slowly eating up AWS. This is a good step and benefits the users.
- sylvain_kerkour 3y agoGreat to finally see this here! Cloudflare is the 4th major cloud platform that (almost) nobody is seeing coming, and I believe that they will even surpass Google Cloud Platform's sooner than expected. The only problem that remains is their support... I'm writing a book about Cloudflare (launching very soon) where I share this and many other things to scale faster all while saving big on your cloud bills. You can join the waiting list here: https://kerkour.com/subscribe https://kerkour.com/subscribe
- NicoJuicy 3y agoI follow cloudflare closely and we use them at work. I agree with your statement :) Their support is superbe, but it takes a while to access. The only time we needed them, the chat option seemed relatively quick. + they pointed us to a tls connect issue at Azure with a very detailed analysis of why. Thing is. If you see a cloudflare error page, it's probably you're hosting provider and not cloudflare...
- zigzag312 3y agoI find Cloudflares pricing webpage incredibly confusing.
- NicoJuicy 3y agoWhat's confusing? This is about R2 > Storage: $0.015 / GB - 10 GB free > Class A operations (mutate state): $4.50 per million - 1 M. free > Class B operations (read state): $0.36 per million - 10 M. free Cloudflare workers: > $0.15/million requests per month ( 100 k. / day included) > Up to 30s wall time per request Min. 5 $ / m. when exceeding the free tier. https://www.cloudflare.com/plans/developer-platform/ https://www.cloudflare.com/plans/developer-platform/
- zigzag312 3y agoOn pricing page for R2 it says "Storage: 10 GB / month" is free ... what does it mean per month? Info that there are "zero egress fees" is only available on R2 product page and not pricing page. IMO R2 pricing page look like it only displays quick info and that there might be fine print somewhere, but there is no link to more details. It could be that's all there is to it, but somehow design feels off to me. Especially because of the "zero egress fees" info being displayed only on the product page. Workers product page shows "Maximum number of scripts": 30 free, 100 paid. But on workers pricing page it shows "Up to 100 Worker scripts" for free and "Up to 500 Worker scripts" for paid. Links to different sections (Pricing, Products...) don't have an option to open in new tab. IMO the whole website is weirdly organized. But maybe it's just me.
- l5870uoo9y 3y agoOne thing is to migrate existing files and integrate it with your application, but you can also use Cloudflare interface to upload large files, e.g. vidoes, and avoid costly egress fees or having to pay more wherever you host your application. The steps are: - click on the R2 link in the Cloudflare dashboard and add a bucket - upload files to be shared (max 300MB) - click the settings tab and add custom domain that you want files shared from This prevented me from having to upgrade to Vercel Pro and saved me $240/y. A bit more on the topic: https://sometechblog.com/posts/don-t-overpay-for-bancwidth/ https://sometechblog.com/posts/don-t-overpay-for-bancwidth/
- moralestapia 3y agoSipping revenue from AWS, awesome!
- krisknez 3y agoThey force you to use their DNS servers if you want to use their S3...
- tacoship 3y agoCan I use Cloudflare R2 and Cloudflare CDN to serve HLS video segments? I always hear about ToS issues with Cloudflare and video. I can never seem to find a straight answer.
- judge2020 3y agoThey created this document for those exclusively using CF services for hosting content including Video: https://www.cloudflare.com/service-specific-terms-developer-platform/ https://www.cloudflare.com/service-specific-terms-developer-... In particular the following line should enable it: > Unlike most Cloudflare products, the Developer Platform can be used to host content. Also see https://blog.cloudflare.com/updated-tos/ https://blog.cloudflare.com/updated-tos/ > Over time, Cloudflare’s network became larger and more robust and its portfolio broadened to include services like Stream, Images, and R2. These services are explicitly designed to allow customers to serve non-HTML content like video, images, and other large files hosted directly by Cloudflare. > Video and large files hosted outside of Cloudflare will still be restricted on our CDN, but we think that our service features, generous free tier, and competitive pricing (including zero egress fees on R2) make for a compelling package for developers that want to access the reach and performance of our network. (of course this is not legal advice)
- tacoship 3y agoThis really cleared things up for me, thank you!
- danwee 3y agoBut who guarantees that Cloudflare will not charge me for egress in the future? Sure nobody guarantees either that S3 won't becomer more expensive, but migrating to another provider just because right now they are cheaper without guarantees of their price in the future seems short-termist.
- judge2020 3y agoYou can't guarantee anything from anyone like that, but they've made their position clear regarding egress fees: https://blog.cloudflare.com/aws-egregious-egress/ https://blog.cloudflare.com/aws-egregious-egress/ comments https://news.ycombinator.com/item?id=27930151 https://news.ycombinator.com/item?id=27930151
- sealeck 3y agoIf you want guaranteed long-term pricing then you have to put that in your contract with your host.
- tyingq 3y agoDoesn't mention if you have some granular control over deletes. Like, if an object has migrated, can you delete it in a way that it's not re-fetched from AWS? Or in a way that it is?
- linsomniac 3y agoIs Cloudflare requiring you to switch to Enterprise plans if your usage is above some threshold? In a previous discussion on HN about Cloudflare, a good half dozen people replied saying they got calls when their usage increased above some level that they had to switch to an enterprise plan, and AFAIK those start at $5K/month (from a brief talk with sales a few weeks ago). We have tens of TB in AWS that we'd like to move to CF, but I'm reluctant to without being able to know if we're going to get a call demanding we switch to enterprise.
- tebbers 3y agoAFAIK R2 is priced completely separately on a pay as you use basis. Have you got a link to these replies?
- linsomniac 3y agoI've done some searching around, but can't seem to find the thread where this came up. It was in the replies to some HN post, and there were 4-5 top level comments all saying the same thing. Wish I would have bookmarked it or something.
- FBISurveillance 3y agoData point: They call you once you hit 300TB egress per month on a _free_ tier and ask to start paying (nothing wrong with that, just a data point).
- _lvbh 3y agoI’ve reached 500 TB a month at one point but never had any issue. Perhaps an email I ignored but nothing went down.
- linsomniac 3y agoIs that on the free tier or one of the paid tiers like the $60/mo or $200/mo?
- taw1516 3y agoDoes CloudFlare have an on-demand image optimization like Vercel? I love that I can specify <Image src="original_image.jpeg width="500px" /> and Vercel just took care of it for me. I am looking for something cheaper and works on native mobile apps as well.
- NicoJuicy 3y agoYeah https://developers.cloudflare.com/images/image-resizing/ https://developers.cloudflare.com/images/image-resizing/ https://developers.cloudflare.com/images/image-resizing/url-format/ https://developers.cloudflare.com/images/image-resizing/url-... Example: src="/cdn-cgi/image/width=80,quality=75/uploads/avatar1.jpg About /cdn-cgi/image/ It's a fixed prefix that identifies that this is a special path handled by Cloudflare’s built-in Worker. --- Price at Cloudflare : 50,000 monthly resizing requests included with Pro, Business. $9 per additional 50,000 resizing requests. See: https://www.cloudflare.com/plans/#add-ons https://www.cloudflare.com/plans/#add-ons As a reference: Vercel is $5 per 1000 source images. So Cloudflare is a whopping 25 x cheaper. Price at Vercel: https://vercel.com/docs/image-optimization/limits-and-pricing https://vercel.com/docs/image-optimization/limits-and-pricin...
- taw1516 3y agothat is a lot cheaper than Vercel in term of store image but egress seems expensive since they charge per cache image served as well. Do you know if Cloudinary is a better option?
- deleted 3y ago[deleted]
- NicoJuicy 3y agoTbh. I'm mostly following Cloudflare + azure. I checked quickly and cloudinary works with credits. Cloudflare mentions 1$ / 100 k. Images served, which seems pretty cheap to me. The pricing I mentioned was for image manipulation, eg. Resizing ( not storage), which was what was asked. I doubt they are cheaper though.
- mannyv 3y agoYou can also use flexify.io, which isn't free but is much cheaper than AWS' egress fees.
- leeeeeepw 3y agoGoogle cloud storage support plz. Also warning to people to use R2 from the get go otherwise you will be stuck with weird architectures like this using both paying for both
- NicoJuicy 3y agoJust a note. Google Cloud is already in the bandwidth alliance, while AWS is not. So you can send your files already to cloudflare at a discounted rate. https://www.cloudflare.com/bandwidth-alliance/ https://www.cloudflare.com/bandwidth-alliance/ Additionally, there are reasons to keep your data duplicate within AWS. There's no one-size-fits-all here. The point is to make use of cloudflare free eggres to get your data where you need it ( since others have egress costs, but no ingress costs) Eg. Train ml models in AWS, GCE or Azure ( where compute is cheapest) and make use of cloudflare to provide them with the data. This should create a huge cost saving, since there's no eggres anywhere. Example: https://blog.cloudflare.com/cloudflare-r2-mosaicml-train-llms-anywhere-faster-cheaper/ https://blog.cloudflare.com/cloudflare-r2-mosaicml-train-llm...
- intellix 3y agoThe whole Firewall and rate limiting of CF is amazing and I like where they're going with the workers and Pages. I've also got a lot out our their free plan for many years but now we're on enterprise it feels a bit extortionate. Every email is another contract to sign and another 2k/mo cause we're going over the initial estimation. Much prefer the PAYG model from the likes of AWS and Google etc, even if it were more expensive, it feels more honest
- nathants 3y agothis is awesome. aws and cf are the perfect combo, and them competing on quality and price is great for consumers. aws is the control plane cf is the data plane and entrypoint. what a time to build.