Hacker News new | ask | show | jobs
by aftbit 46 days ago
Cloudflare workers don't have cold starts? How do they manage that? I thought they'd still have firecracker or something underneath. Are they trusting the V8 sandbox that much?
1 comments

Yes, they're trusting it that much (https://developers.cloudflare.com/workers/reference/security...). This is nonzero controversial. Of course, spinning up a new isolate takes more than zero time, but it's quick enough that handling it in parallel with the TLS handshake eliminates most of the cold-start time (https://blog.cloudflare.com/eliminating-cold-starts-with-clo...), and also it's less likely to be needed if there's already an instance running somewhere (https://blog.cloudflare.com/eliminating-cold-starts-2-shard-...).
Cloud Run scales to zero and can handle concurrent requests. I'd make the case that as long as you point a scheduled HTTP request to the Cloud Run instance and keep it "hot", handing an incoming request off to a thread sitting in a thread pool is always going to be faster.
You can also do that with Cloudflare Workers if you want.