From my current connection, I have a ~10ms roundtrip to the nearest Cloudflare PoP:
$ ping <mycloudflaresite>.com
PING site.com (172.66.43.152): 56 data bytes
64 bytes from 172.66.43.152: icmp_seq=0 ttl=56 time=10.614 ms
64 bytes from 172.66.43.152: icmp_seq=1 ttl=56 time=11.384 ms
64 bytes from 172.66.43.152: icmp_seq=2 ttl=56 time=9.837 ms
64 bytes from 172.66.43.152: icmp_seq=3 ttl=56 time=16.474 ms
64 bytes from 172.66.43.152: icmp_seq=4 ttl=56 time=10.385 ms
64 bytes from 172.66.43.152: icmp_seq=5 ttl=56 time=15.589 ms
64 bytes from 172.66.43.152: icmp_seq=6 ttl=56 time=10.626 ms
64 bytes from 172.66.43.152: icmp_seq=7 ttl=56 time=10.878 ms
64 bytes from 172.66.43.152: icmp_seq=8 ttl=56 time=16.445 ms
Yet, Cloudflare takes ~26-30ms to respond to the simplest worker (just an empty fetch returning an ‘ok’ string) as measured by curl
or the Chrome network tab. I would’ve expected to be able to do that in just around 10ms, give or take 2-3ms!
And if we analyze in Wireshark, we can see that Cloudflare responds with the initial HTTP/3 headers etc. at 10ms, but takes another 13ms before the worker has responded:
Of course, worrying about ~15ms may seem petty, but I am genuinly curious where this time is spent. Is someone able to explain why it spends that long inside the Cloudflare network to make it to a hot isolate? Is this the WAF, etc.? Is there anything I can do (I am on the Business plan with every performance toggle turned on), or is this the inherent performance profile?