Closed 205g0 closed 1 year ago
Nothing in wrangler, miniflare, or workerd treat 1.1.1.1 specially. DNS requests are just delegated to the regular DNS libraries that all apps use. So, I don't see how this could be a bug in any of our code. It sounds more like a problem with your regular DNS provider -- maybe it's just a lot slower than 1.1.1.1?
Ok, good points. I just tried it with Google's DNS 8.8.8.8 and it's also faster (not as fast as CF's though) than what I had initially. The point is—I have had this with every new set up Windows WSL2 laptop. And I forget about changing my DNS every single time. And others will have this too and the cause ("change your DNS") is so far away that it should be in the docs at least. Also, who changes their DNS settings? Some might but most leave them to Windows default ones.
Plus, I have this with no other setup, e.g. some node server running in Docker fetching around.
Let me know if I should close but this issue can be such a big annoyance which is hard to track ("is it my DB, my ORM, ...??").
Hey! 👋 As @kentonv points out, we don't treat 1.1.1.1 specially and this is likely an issue with your regular DNS provider. I wasn't able to reproduce a significant slowdown using WSL 2 and an alternative DNS (mobile data via iPhone hotspot with Cloudflare WARP disabled, verified with https://1.1.1.1/help). I'd expect 1.1.1.1 to make things faster, but this does not seem to be an issue with Wrangler, so we're going to close the issue.
thanks for looking into it, fyi i just set up a new machine and got this: https://github.com/cloudflare/workers-sdk/issues/3121#issuecomment-1766020122
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.7.0
What version of Node are you using?
18.7.1
What operating system are you using?
WSL2
Describe the Bug
Testing db queries against PlanetScale via Drizzle ORM, a simple find in an indexed table with 30 records takes whopping 4.7sec. First, I though it must be Drizzle or PlanetScale but then realized that I was on a new machine where I haven't switched to Cloudflare's DNS 1.1.1.1 yet.
Once I've switched, bam, 0.8sec for the request (be aware that I and the PlanetScale are far apart). On production it's then about 0.3sec).
Please provide a link to a minimal reproduction
just a/b-test any app with a fetch with CF DNS and without
Please provide any relevant error logs
No response