7 ms·
Cloudflare Containers (and therefore Sandbox) pricing is way too expensive. The pricing is a bit cumbersome to understand by being inconsistent with pricing of
by eis 11mo ago
Cloudflare Containers (and therefore Sandbox) pricing is way too expensive. The pricing is a bit cumbersome to understand by being inconsistent with pricing of other Cloudflare products in terms of units and split between memory, cpu and disk instead of combined per instance. The worst is that it is given in these tiny fractions per second.
Memory: $0.0000025 per additional GiB-second
vCPU: $0.000020 per additional vCPU-second
Disk: $0.00000007 per additional GB-second
The smaller instance types have super low processing power by getting a fraction of a vCPU. But if you calculate the monthly cost then it comes to:
Memory: $6.48 per GB
vCPU: $51.84 per vCPU (!!!)
Disk: $0.18 per GB
These prices are more expensive than the already expensive prices of the big cloud providers. For example a t2d-standard-2 on GCP with 2 vCPUs and 8GB with 16GB storage would cost $63.28 per month while the standard-3 instance on CF would cost a whopping $51.84 + $103.68 + $2.90 = $158.42, about 2.5x the price.
Cloudflare Containers also don't have peristent storage and are by design intended to shut down if not used but I could then also go for a spot vm on GCP which would bring the price down to $9.27 which is less than 6% of the CF container cost and I get persistent storage plus a ton of other features on top.
What am I missing?
- ATechGuy 11mo agoStartups would build on big tech, so are likely to add their margins. Have you looked into (bulk) discounts from GCP/AWS?
- Imustaskforhelp 11mo agoCloudflare containers feel a lot more pricey as compared to workers but I think that it could provide more streamlined experience imo but still, If we are talking about complete cost analysis, sometimes I wonder how much cf containers vs workers vs hetzner/dedicated/shared vps / gcp etc. would work out for the same thing. Honestly, the more I think about it, my ease of sanity either wants me to use hetzner/others for golang/other binary related stuff and for the frontend to use cf workers with sveltekit That way we could have the best in both worlds and probably glue together somethings using proto-buf or something but I guess people don't like managing two codebases but I think that sveltekit is a pleasure to work with and can easily be learnt by anybody in 3-4 weeks and maybe some more for golang but yeah I might look more into cf containers/gcp or whatever but my heart wants hetzner for backend with golang if need be and to try to extract as much juice as I can in cf workers with sveltekit in the meanwhile. Thoughts on my stack?
- the_duke 11mo agoIt doesn't really make sense to compare this to regular VM pricing I think. This is a on-demand managed container service with a convenient API, logging, global placement in 300+ locations, ... AWS Lambda is probably closer in terms of product match. (sans the autoscaling) Depending on what you do , Sandbox could be roughly on par with Lambda, or considerably cheaper. The 1TB of included egress alone would be like 90$ on AWS. Of course on lambda you pay per request. But you also apparently pay for Cloudflare Worker requests with Sandbox... I reckon ... it's complicated.
- chandureddyvari 11mo agoYou can’t compare these with regular VM of aws or gcp. VM are expected to boot up in milliseconds and can be stopped/killed in milliseconds. You are charged per second of usage. The sandboxes are ephemeral and meant for AI coding agents. Typical sandboxes run less than 30 mins session. The premium is for the flexibility it comes with.
- freakynit 11mo agoSerously, what flexibility? I coud easily spin-up a firecracker VM on-demand and put it behind an API. It boots up in under 200 milliseconds. and I get to control it however I wish to. And also, all costs are under my control. I compared the costs with instances purchased from Hetzner or Contabo here: https://news.ycombinator.com/item?id=45613653 https://news.ycombinator.com/item?id=45613653 Bottomline: by doing this small stuff myself, I can save 35 times more.
- chandureddyvari 11mo agoIn my case, it is ignorance. I am not familiar with how to wield firecracker VMs and manage their lifecycle without putting a hole in my pocket. These sandbox services(e2b, Daytona, Vercel, etc.) package them in an intuitive SDK for me to consume in my application. Since the sandboxing is not the main differentiator for me, I am okay to leverage the external providers to fill in for me. That said, I will be grateful if you can point me to right resources on how to do this myself :)
- freakynit 11mo agoLol.. a full-fledged project just launched on Github using firecracker and giving cli/api interfaces: https://github.com/Katakate/k7 https://github.com/Katakate/k7
- freakynit 11mo agoThis is a pretty good use-case for an open-source project then. For guide, just follow their official docs. I did those again today, literally copy-pasted shell commands one after the other, and voila.. had firecracker vm running and booting a full-fledge ubuntu vm. It was sooo damn fast that when it started, at that moment I thought that my terminal had crashed because it's prompt changed. But nop. It was just that fast that even while literally looking at it I was not able to catch when it actually did boot-up. By the way, two open-source projects already exist: 1. NodeJS: https://github.com/apocas/firecrackerode https://github.com/apocas/firecrackerode 2. Python: https://github.com/Okeso/python-firecracker https://github.com/Okeso/python-firecracker