Cloudflare server high latency

My site server is located in Bangalore, India and majority of my visitors are from Pakistan, India and Middle East. I also knew that Cloudflare have their datacenters in 3 different locations in my country and their data centers are also available in India. When I tried to check the latency with traceroute, this is what I gets:

From 1-12 are my local hops from my country, Pakistan. Afterwards 13-15 are Cloudflare datacenters which are located in Italy and then finally no. 16, a Cloudflare origin server in US. I wonder why Cloudflare have chosen its Italy based server when there are datacenters available in my country and in India, Middle East too. Also this Italy based server latency is very high.

Is there any possibility to improve these latencies?

1 Like

This is usually a routing issue with the user’s ISP. Here is some information as to why some users are routed far away:


I guess you’re free or pro user, and india maybe is another premium location that available for business or enterprise user.

The ISP still has only decision which route traffic takes and it’s usually the ISP’s business plans (not residential) that gets priority (if any).

1 Like

Thanks a lot. It was an issue with my ISP, as soon as I switched to different ISP it took less than 50ms and only 8 hops instead of 16. This ISP has partnered with Cloudflare and they are linked to their servers in my country. :slight_smile:



I have now another small issue. The latency is now less than 50ms, I was expecting my site with Cloudflare to response back in ms but its taking about 1.2s. If I directly access my origin server then it loads in about 0.5s. Here are my 2 links (Cloudflare, origin) to as suggested for a test at this link.

Any suggestion? I am now in doubt that there might be some settings issue with Cloudflare. :confused:

Curiously enough, I just found out that the reason one of my websites has shed about half a second of it’s load time (from ~2.0 secs to ~1.5 secs) in the past week or so, as recorded by GTMetrix, is that it is now being served out of GRU, instead of a US colo.

Nevertheless, my other 3 domains are still recording EWR, MIA or IAD as their colo, according to the GTMetrix São Paulo servers and my own trace route. They are all on the same Cloudflare nameservers. Go figure!


Here is my another timeline for Cloudflare and Origin server.


It clearly shows that the Content Download time in both requests are almost same which means that there is no issue with my server itself. The time exceeds only in TTFB. I wonder what fishy is happening inside Cloudflare.

Here is my origin server traceroute:

Its very odd… Origin server is having about 18 hops but still gives TTFB of only 0.5s. Cloudflare server have 8 hops but it gives TTFB of 1.34s.

TTFB will be a bit longer (but typically not an entire second) because Cloudflare needs to get the Page Source from your server, then deliver it to your visitor. But overall load time should be significantly shorter as static content becomes cached and delivered directly to your visitors.

What is that timing screenshot from? If you post your domain name, we can do some looking around regarding performance.

That screenshot is related to the API link which I am testing for performance. APIs are dynamic so there is no way to cache them. or may be I am thinking to use my Origin server for API purposes and Cloudflare for site.

Ideally, set some test up on the origin then log tests from various ISP/Locations.

This is what I’m getting from my site. It really helps to find good hosting.

1 ms <1 ms <1 ms
11 ms 9 ms 9 ms
16 ms 17 ms 15 ms
18 ms 18 ms 17 ms
23 ms 24 ms 24 ms []
24 ms 24 ms 23 ms

1 ms <1 ms <1 ms
1 ms 1 ms 1 ms
6 ms 6 ms 6 ms []
6 ms 7 ms 6 ms []
6 ms 5 ms 5 ms

1 Like

I do have one concern now, that since the traceroute result of my domain is less than 50ms and my cloud server based in Bangalore made internal processing in about 0.02s. Then Cloudflare should receive the response (TTFB) within 100-120ms. But my concern is the Cloudflare IP address assigned to my domain is which is based in US whereas my cloud server is based in Bangalore.

I am in doubt that if Cloudflare assign the IP also based on their India server, then it may further reduce the TTFB time. What you guys say? Is this possible?

Those IP addresses are on the Anycast network, so traffic is routed to the closest location, much like how Google’s is routed to their nearest datacenter.

Routed to their nearest location? My cloud server is hosted in Bangalore, India and how come the closest location calculated by Cloudflare is in US instead of India?

I wasn’t very clear. It’s not always Geographically closest, as I explained in an earlier post on Peering.

The problem is with fixed IP ( assigned to my domain from Cloudflare when I register my site for their CDN. Even I have purchased Argo service but this IP never change.

I am thinking to move my cloud server also to New York, US, may be it create a difference. What you say?

Or Cloudflare can change IP to India based, if I contact their support?

Please read the Anycast section of the article I linked to.

1 Like