Live data from Hacker News

Cloudflare Sandbox SDK

sandbox.cloudflare.com

41–50 of 95 posts

Re: Cloudflare Sandbox SDK

#41
post #21

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 v…

It 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.

Re: Cloudflare Sandbox SDK

#42
post #15
post #14

Looks like there's one feature missing from this that I care about: I'd like more finely grained control over what outbound internet connections code running on the box can make. As far as I can tell it's all or nothing right now: this.ctx.container.start({ enableInternet: false, }); I want to run untrusted code (from users or LLMs) in these containers, and I'd like to avoid someone malicious using my container to la…

This simple feature bumps up the complexity of such a firewall by several orders of magnitude, which is why no similar runtime (like Deno) offers it. Networking as a whole can easily be controlled by the OS or any intermediate layer. For controlling access to specific sites you need to either filter it at the DNS level, which can be trivially bypassed, or bake something into the application binary itself. But if you…

If a single TCP channel is all that is allowed, on a single port to a single orchestrator IP, and the only service attached to that channel on the other end is the orchestrator which reports results to the host worker, why would you need anything to do with DNS? Isn't this a simple thing to do with a firewall rule, once you know the orchestrator's network-local IP?

(Certainly this would prevent things like package manager installations, etc... but if you're in a use case where you really want to sandbox things, you wouldn't want people to have e.g. NPM access as I'm sure there are ways to use that for exfiltration/C&C!)

Re: Cloudflare Sandbox SDK

#44
post #19

Earlier quoted context omitted.

> It does take 1-5 seconds to boot the environment (firecracker vms). I'd say 1-5 secs is fast. Curious to know what use cases require faster boot up, and today suffer from this latency?

When your agent performs 20 tasks saving seconds here and there becomes a very big deal. I cannot even begin to describe how much time we've spent on optimising code paths to make the overall execution fast. Last week I was on a call with a customer. They where running OpenAI side-by-side with our solution. I was pleased that we managed to fulfil the request under a minute while OpenAI took 4.5 minutes. The LLM is no…

Have you tried e2b or Daytona fast start vms?

Re: Cloudflare Sandbox SDK

#45
post #43

This looks rough for e2b.dev, Beam, and others in this space. Even with e2b's fresh $20M raise, taking on Cloudflare is going to be tough.

e2b have a python SDK thats why I would use them when I start a new project, (knowing Cloudflare they probably won't)

Re: Cloudflare Sandbox SDK

#47
post #21

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 v…

You 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.

Re: Cloudflare Sandbox SDK

#49

Earlier quoted context omitted.

You cannot bypass DNS within Cloudflare’s environment.

What does that mean? That's essentially like saying "you cannot bypass HTTP" within Cloudflare's environment. It doesn't make any sense. Do you mean they force you to use their DNS? What about DOH(s)? What about just skipping domain lookup entirely and using a raw IP address?

You can restrict outbound network to HTTP using the outbound worker mentioned elsewhere in the thread and filter the domain name of the outbound request against a whitelist of domains you control. The DNS resolution of the domain happens within the CF network stack that you have no control over and that can’t be overwritten in anyway meaning if you restrict outbound to Google.com, there’s no way for that request to end up anywhere else. The whitelist filter you put in place would disallow raw IP addresses and DoH isn’t relevant because again your whitelist of servers you control can just not expose DoH.

Re: Cloudflare Sandbox SDK

#50
post #22
post #15

Earlier quoted context omitted.

This simple feature bumps up the complexity of such a firewall by several orders of magnitude, which is why no similar runtime (like Deno) offers it. Networking as a whole can easily be controlled by the OS or any intermediate layer. For controlling access to specific sites you need to either filter it at the DNS level, which can be trivially bypassed, or bake something into the application binary itself. But if you…

The most convincing implementation I've seen of this so far is to lock down access to just a single IP address, then run an HTTP proxy server at that IP address which can control what sites can be proxied to. Then inject HTTP_PROXY and HTTPS_PROXY environment variables so tools running in the sandbox know what to use.

[deleted]
Post reply on HN