why high ping on pages?

ping from india on mywebsite.com is 140ms average while on mywebsite.pages.dev is 14ms what could be the reason and how to troubleshoot? ping from most other locations is good (sub 10ms) p.s.: mywebsite.com is a placeholder name for my actual domain name.
50 Replies
zilch
zilch•4mo ago
Same for my deployments as well. Also the pages.dev is served from NAG while the my domain is served from SIN I think this has to do with that pages.dev is being treated as an enterprise account vs my free plan website Would be glad if someone can confirm this is the case
Chaika
Chaika•4mo ago
yes, pages.dev have essentially ent/argo routing
Chaika
Chaika•4mo ago
could look at https://cloudflare.manfredi.io/en/tools/datacenters/ and https://debug.chaika.me/?findColo=true and see where you get routed depending on plan
Cloudflare Tools
Cloudflare Tools
A set of unofficial tools to check connectivity to the Cloudflare network.
zilch
zilch•4mo ago
Argo routing helps pages deployments?
Chaika
Chaika•4mo ago
Argo gives you Enterprise like inbound routing
zilch
zilch•4mo ago
I thought Argo is between the server and cloudflare... So for a cached deployment such as pages, it won't help at all
Chaika
Chaika•4mo ago
Argo is primarily that yea, adverts better routing to origin which Pages can't benefit from -- but it also gives you Enterprise like inbound routing
zilch
zilch•4mo ago
Indian cloudflare customers have it tough, bad routing on free plan and no proper payment support for upgrades (apart from PayPal)
Chaika
Chaika•4mo ago
it's the Indian ISPs who are to blame for that part lol, wanting CF to pay for peering and being silly
zilch
zilch•4mo ago
Yes I'm looking to get a PayPal account, that's the only option 😄
Chaika
Chaika•4mo ago
CF has a bunch of IP Pools with different routing. The IPs Pages uses aren't normal Enterprise ranges I'm used to seeing, and they look like Argoish ones, but they seem more exclusive to Pages/same reused ones, so that's why I would say "essentially Argo/Ent", probably ones from a different pool just for Pages to try to avoid blocking issues which have Enterprise routing
zilch
zilch•4mo ago
Thanks for confirming my thoughts @Chaika
sumit
sumitOP•4mo ago
thanks @Chaika and @zilch anyway i can fix the high latency/ping?
Chaika
Chaika•4mo ago
for yourself? WARP can sometimes help for visitors? upgrading plan, although there's no guaranteed colo selection/it may shift in the future. You could look at those two links I gave to see if Pro connects to local pops (I bet it does) and consider upgrading. If you don't need any of the features of the proxy (like redirects, transform rules, etc), disable proxy on the cname in your zone under dns -> records and you'll get the routing of the pages.dev
sumit
sumitOP•4mo ago
i'm building apis, so using cloudflare as a middleware would not make sense if some users get 100ms+ latency from a middleware, not that concerned about the ping on website, but it effects the API latency so that's why
Chaika
Chaika•4mo ago
then sounds like one of the two options are what you want If you don't need any of the features of the proxy (like redirects, transform rules, waf, rate limiting, etc), disable proxy on the cname in your zone under dns -> records and you'll get the routing of the pages.dev If you need the features of proxying it through your zone/website in Cloudflare (and all the rules) -> upgrading plan, although there's no guaranteed colo selection/it may shift in the future. You could look at those two links I gave to see if Pro connects to local pops (I bet it does) and consider upgrading.
sumit
sumitOP•4mo ago
any downsides of turning off proxy? proxy sounds like a good thing to have
Chaika
Chaika•4mo ago
The things I mentioned being features of proxy Your zones/website configuration as a whole won't apply, no waf , rate limiting rules, redirect rules, page rules, etc
sumit
sumitOP•4mo ago
if my origin server is cloudflare pages, turning off proxy isn't that much of a bad deal, right? like, is the website still protected by waf because the origin server is also cloudflare pages?
Walshy
Walshy•4mo ago
Yes, you just don't have configuration over it Disabling the proxy can be good in some situations, it really just depends on needs and what things are in use If you don't need any zone features, then disabling proxy is perfectly fine
sumit
sumitOP•4mo ago
thanks @Walshy that made it crystal clear. will turn it off. update: ping for india is down to few milliseconds, so this is solved now. thanks! for anyone who reads this in the future: just disable proxy if you're using cloudflare pages already. fun fact: 38.8ms ping from starlink
Wouter
Wouter•4mo ago
I thought the proxy was also arranging https, or was that eons ago 😄
Walshy
Walshy•4mo ago
it's still hitting cf and benefiting from everything cf gives (including certs) since it's going to Pages (a cf product)
Wouter
Wouter•4mo ago
Ah cool, cheers of the explanation!
zilch
zilch•4mo ago
I tried disabling proxy, and ttfb went down but I didn't see much difference in page load times. Will check again. What exactly are you measuring and how?
sumit
sumitOP•4mo ago
ping from various countries lots of websites to test that for global (many data points), and from my own laptop via terminal for local ping (will get only 1 data point here)
zilch
zilch•4mo ago
KeyCDN
Performance Test - Check URL Speed From Different Global Locations ...
Single asset performance test from multiple locations. Analyze the TTFB, DNS, TLS and connection times for any URL.
zilch
zilch•4mo ago
i'm consistently seeing 500+ ms ttfb on my websites vs 80 ms ttfb on the pages.dev of the same website the problem is that if i disable orange cloud, then i lose my real user measurement and zaraz 😄 i need to look into how to setup both manually without the proxy enabled
sumit
sumitOP•4mo ago
test pure ping: https://check-host.net/
Check server : Check host - online website monitoring
Check server: website monitoring with useful tools, Check IP, Check website
sumit
sumitOP•4mo ago
or from the website you sent: https://tools.keycdn.com/ping
KeyCDN
Ping Test - Simultaneously Ping From Different Global Locations | K...
Ping any IP address or hostname from multiple locations in parallel. Analyze the latency to identify potential connectivity and speed issues.
sumit
sumitOP•4mo ago
true, maybe @Walshy | Deploying knows if there is any way to keep tracking the site analytics (visitors etc) since cf pages is already being used even if proxy is off?
Walshy
Walshy•4mo ago
web analytics is client-side, you can use that but anything that needs the zone yeah won't work as the zone is skipped (it's eyeball -> pages not eyeball -> zone -> pages)
sumit
sumitOP•4mo ago
oh cool, will add web analytics to code will zaraz work though?
Walshy
Walshy•4mo ago
zaraz will not, it requires zone stuff no proxy, your zone literally doesn't exist in the request path
sumit
sumitOP•4mo ago
oh okay! how do i know beforehand what needs zone stuff and what doesn't?
Walshy
Walshy•4mo ago
anything you configure on the zone will not work
sumit
sumitOP•4mo ago
hmm, so i can't differentiate then
zilch
zilch•4mo ago
I set up zone web analytics using the manually added js snippet And disabled proxy Zaraz can also be setup, although I'm waiting to see any page load improvement before implementing zaraz this way
zilch
zilch•4mo ago
Cloudflare Docs
Use Zaraz on domains not proxied by Cloudflare · Cloudflare Zaraz d...
You can load Zaraz on domains that are not proxied through Cloudflare. However, you will need to create a separate domain, or subdomain, proxied by …
sumit
sumitOP•4mo ago
where are the docs for the js if you don't mind sharing here?
zilch
zilch•4mo ago
In the analytics tab, add your zone and setup analytics using the js snippet and not the automatic setup
sumit
sumitOP•4mo ago
https://developers.cloudflare.com/web-analytics/get-started/ this says that it's automatic for pages projects (last section)
Cloudflare Docs
Enabling Cloudflare Web Analytics · Cloudflare Web Analytics docs
Web analytics is now set up on your website, but it may take a few minutes for Web Analytics data to appear.
sumit
sumitOP•4mo ago
don't know if that's valid for unproxied domains too? walshy might know but i don't want to bug him again and again
zilch
zilch•4mo ago
That's another way to directly setup on the pages project. I tried it once, but shifted to the zone level analytics coz I was using the proxy. I'm not sure if we directly need to visit pages.dev urls for pages to track the visit, or any custom domains will also get tracked
sumit
sumitOP•4mo ago
same question tbh i feel like anyone that visits website.com will get counted in analytics of website.pages.dev?
zilch
zilch•4mo ago
Will try it tomorrow 🙂 getting late tonight Yes it's getting counted I just set analytics up on pages, no need to do it manually or on the zone I'm seeing around 200ms improvement in both TCP and response p90 timings And 400ms improvement in fcp Pageload is still the same due to third party code execution being the long pole I think Will try zaraz manual implementation as well today to get rid of the third party code It's tricky and surprising how setting up cloudflare proxy over cloudflare pages gave worse performance
sumit
sumitOP•4mo ago
is zaraz manual implementation different? walshy said zaraz won't work this^ haha true. i'm happy that the team is here to clarify things, otherwise we'd be stuck with suboptimal configurations.
zilch
zilch•4mo ago
I got zaraz to work somehow, check the thread i started in #zaraz
sumit
sumitOP•4mo ago
alright, what're you using it for?
zilch
zilch•4mo ago
fb and google ads
Want results from more Discord servers?
Add your server