measuring latency

Hi 👋 I am using HyperDrive with my Postgres db in Oracle server located in Germany with Cloudflare workers. (I am also working n Germany)Connection is made and working without problem but the response is still slow(a bit faster than direct connection). Funny thing I found is it is very fast with mobile network while it is slow with my WiFi with same running contents. (200ms vs 2 seconds). Is this because HyperDrive needs some traffic to calculate? Right now I have no users as it is in dev. Thanks!
2 Replies
AJR
AJR•2w ago
Hi! I'll try to go through this in order: * No, unless you have Smart Placement turned on for your Worker, there should be no burn-in period needed. Hyperdrive should be as fast as it gets on query 1 (give or take a cold cache, I suppose) * If you're seeing big differences in between mobile and a PC, I'd suggest the issue might be something with your ISP's routing to/from Cloudflare's network? * You can double check this by measuring latency of your queries from within the Worker. Here's a link discussing how that should work. Date.now() is what I use for quick-and-dirty latency measurements and regression checks. https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow
Hochul
HochulOP•2w ago
Thank you for the info. It is fast with other WIFI network, slow only from some WIFI. I will try to measure the latency, thanks!

Did you find this page helpful?