7 ms·
> Cloudflare Workers and Deno Deploy are ephemeral, as in, the process that serves client request is not long-lived, and in fact, two back-to-back requests may
by buffrr 4y ago
> Cloudflare Workers and Deno Deploy are ephemeral, as in, the process that serves client request is not long-lived, and in fact, two back-to-back requests may be served by two different isolates (processes)
I suspect this would impact latency. Any benchmarks done to compare Cloudflare workers, Deno and fly.io for this specific application (i don't think ping alone is fair)? I'm guessing fly.io is more suitable here. Also, DoH clients generally maintain a pool of connections to the DoH server i'm not completely sure how this is handled with something like Cloudflare workers.
- kentonv 4y ago> I suspect this would impact latency. Why is that?
- DeWilde 4y agoSpinning up a process takes some time, adds up across many requests.
- kentonv 4y agoCloudflare Workers uses isolates, not processes.[0] They start much faster, typically in single-digit milliseconds. In fact, Workers can usually spin up an isolate in parallel with the TLS handshake.[1] After receiving the SNI packet containing a hostname, it'll go start up the isolate for that host, if it isn't running already. TLS typically needs another round trip from there to do a key exchange before application data starts flowing, by that time the isolate is ready to serve. In that case, there is no added latency. (I am the tech lead for Workers.) [0] https://blog.cloudflare.com/cloud-computing-without-containers/ https://blog.cloudflare.com/cloud-computing-without-containe... [1] https://blog.cloudflare.com/eliminating-cold-starts-with-cloudflare-workers/ https://blog.cloudflare.com/eliminating-cold-starts-with-clo...
- riedel 4y agoThanks for the article link. It is quite interesting to me that is only possible because we all need to trust the V8 sandboxing anyways. It makes sense since it should not be compromised on the other end of the connection either. However, one should still probably be aware that any exploit would be probably much more practical than e.g. a spectre attack.
- happyopossum 4y agoThat is crazy cool - thanks for sharing!
- humbleharbinger 4y agoAny tips on getting a job at cloud flare as a new grad; it's one of my dream companies.
- aaaaaaaaaaab 4y agohttps://www.cloudflare.com/en-gb/careers/ https://www.cloudflare.com/en-gb/careers/
- DeWilde 4y agoCool, thanks for pointing this out :).
- metadat 4y agoVery interesting, thanks for sharing this @kentonv. After four years it might warrant a fresh follow-up conversation, so I submitted: https://news.ycombinator.com/item?id=32289979 https://news.ycombinator.com/item?id=32289979 I hope to learn if anyone else has been using Isolates to great, or any, effect.
- immrammc 4y agoWow hadn’t heard about isolates at all, really cool! thanks for sharing!
- mrbungie 4y agoI guess parent is refering to cold starts. With enough requests/sec and a good scaling mechanism it shouldn't be a problem though.
- geysersam 4y agoCold starts for Deno deploy and Cloudflare workers are much shorter than something like AWS lambda or Google functions.
- endorphine 4y agoThat doesn't invalidate the cold start argument though.
- alexnewman 4y agoProcesses, threads , isolates who cares? It’s all so small right?
- intel_brain 4y agoThis is an incredibly small for to use up compute. I bet 1ms compute usage avg. on cloudflare workers even with coldstarts.