Cloudflare server high latency

dash-dns
#21

I am copying here whats written on that link about AnyCast:

“While Unicast is the easiest way to run a network, it isn’t the only way. At CloudFlare, we make extensive use of another routing scheme called Anycast. With Anycast, multiple machines can share the same IP address. When a request is sent to an Anycasted IP address, routers will direct it to the machine on the network that is closest. Return to our friends at laughingsquid.com. They are CloudFlare users so if you request their website you get back one or more CloudFlare IP addresses. Under normal circumstances, it doesn’t matter where you are in the world, you will get the same IP addresses. However, there are machines in 12 data centers all listening on those IPs. As a result, the network itself will direct traffic to the nearest CloudFlare data center to where you are making the request from.”

Its further cleared that IP allotted 104.31.76.47 to my domain will be fixed but when visitors try to access my domain they will direct the visitors to their nearest Cloudflare datacenters which can reach the IP 104.31.76.47 with minimum possible hop (as I am using Argo service also, it may further improve it).

What happens after that? After that Cloudflare will access my server for data response and this is where it will connect from US to Bangalore and can create a time lag in TTFB. I will try to move my cloud server to New York to further test the difference in TTFB.

1 Like
#22

After that? For example, I live in Los Angeles, so I hit 104.31.76.47 at the LAX datacenter for your site. But LAX needs to hit Bangalore for anything that’s not cached, such as your main page HTML.

If you switch to a US server, I will get a faster TTFB through 104.31.76.47 at LAX, but you will get a slower TTFB through 104.31.76.47 at your nearest datacenter.

I always host on servers closest to my target audience. But the two IPv4 addresses for my site never change.

#23

After moving my server to Cloudflare IP based location in North America (New York), the TTFB has further decreases to about 500ms only. It was a success! :slight_smile:

@sdayman Cloudflare will deliver you the response not my server. You will never be directly connected to my server when using Cloudflare. This is where Argo service further helps to reduce the hop and latency. So, if you are in US, it will be more faster for you, if the visitor is from Asian based location then Cloudflare Argo service will handle it to deliver the response quickly.

Only key idea is to have your server located to nearest location based on the IP address allotted to you by Cloudflare, which in my case was North America based, to get quick response from your server reducing time in TTFB. Rest will be handled by Argo service to further quickly deliver the response to visitors.

Have a good day! Thanks for your time and discussion.

1 Like
#24

That address is advertised from all of Cloudflare’s datacenters. Argo will potentially improve the performance between a Cloudflare POP and your origin server (wherever it may be).

This may be due to having a better origin server in general or having a better route to the host from the Cloudflare DC you happen to be connected to, but your 104.31.76.47 is not NY or US specific in any way.

4 Likes
#25

However… glad to hear that performance overall has improved!

2 Likes
#26

My origin cloud server is from same hosting, I just relocated to new region. I have checked the IP address location at https://tools.keycdn.com/geo?host=104.31.76.47. Why does it shows North America.

#28

If I do a trace route from my location to that same IP, you can clearly see it’s going to the Canadian Data Centre in Quebec. Why? because it’s the quickest OR the preferred route by my ISP.
If everyone else here does a trace route, they’ll be different. Same thing when I go to my neighbours, work or mobile each using different ISP’s.

1 ms 2 ms 1 ms xxxxxxxxxxx
60 ms 10 ms 10 ms xxxxxxxxxxx
51 ms 15 ms 64 ms xxxxxxxxxxx
75 ms 18 ms 59 ms xxxxxxxxxxx
75 ms 72 ms 26 ms cloudflare.peer.qix.ca [198.179.18.55]
76 ms 76 ms 23 ms 104.31.76.47

Please read the documents supplied by everyone else.

#29

Thats what depicted on official page that it will improves the route between Visitors and Cloudflare in reaching the origin server. Not between Cloudflare and my Origin server.

#30

What’s your domain? it’ll be the same. *Sorry… Not exactly the same but close.

#31

Any how there should be a way to let customer choose the region for his Cloudflare IP so he will be assigned the nearest IP based on his server geographical location which will help further minimize the route and hops to reach the server. My be I was lucky to know the nearest location by assumption or the IP address location determined by https://tools.keycdn.com/geo?host=104.31.76.47 in North America was correct.

#32

Cloudflare often doesn’t have the means to choose how traffic is routed from Customer -> CF. As said above, it’s an AnyCast IP address, so geolocation services will be inaccurate (that IP is not a North America IP, it’s an everywhere- IP).

As for your concern, regarding the quality of routing between CF and your origin: Cloudflare will directly go from the Datacenter -> your server if you don’t have Argo enabled. If you have Argo enabled, Cloudflare will route traffic over to other CF datacenters that are closer to your Origin server before actually going out to your origin. Since the routes between CF’s own datacenters are shorter, it should decrease latency.

#33

I am worried more about NS record because the current NS automatically provided were both from North America region. This will be a drawback for my majority of visitors who are from Asia. For US, Canada side visitors it will be much faster.

#34

This is already sorted out after I moved my server from India to North America Region and I already noticed the improvement in performance and posted here before.

#35

I wonder when Cloudflare have datacenters in India also why they don’t provide NS also from that region. They should provide the facility to their customers to select the region for NS records too.

#36

Please understand how Anycast works: A single Cloudflare IP address is answered by the nearest datacenter. It doesn’t matter where you are…the fastest data center will respond.

This applies to:

  • The Cloudflare name servers for your domain
  • The public Cloudflare IP address for your website
  • Cloudflare’s 1.1.1.1 public name server service

There’s no need to let customers select a region for their name servers, or any other service Cloudflare provides. It is always the closest to the user thanks to Anycast.

The magic word is Anycast.

1 Like
#38

Cloudflare most definitely does not house name servers in their corporate office building.

2 Likes
closed #39

This topic was automatically closed after 30 days. New replies are no longer allowed.