🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

CDN routing to US instead of São Paulo causing latency issues.

9 replies
Last updated: Sep 16, 2022
Hi all, cdn questionif i call this cdn url
scp71evy.apicdn.sanity.io from NYC US and Sao Paolo Brazil the cdn call goes to US datacenter ? i saw sanity has CDN datacenter in Sao Paolo
Sep 15, 2022, 8:51 PM
Hi User. I can check into this; would you mind confirming where you’re seeing that the call goes to the US instead of São Paulo?
Sep 15, 2022, 9:24 PM
hi, nice to meet you!let me help with this, I am the one in Sao Paulo...
👋
Sep 15, 2022, 9:32 PM
if I'm getting it right, the IP 34.102.168.221 is in Kansas City
Sep 15, 2022, 9:35 PM
My colleague was looking into something like this, so I’ll check on the work he did and get back to you, but I believe it’s some sort of IP aliasing (I’m not sure the exact term for it). We can see it’s likely at play here because a signal couldn’t get from São Paulo to Kansas City and back in 9 ms.
Sep 15, 2022, 9:37 PM
I’ll follow up shortly once I have some specifics.
Sep 15, 2022, 9:38 PM
Thanks
Sep 15, 2022, 9:38 PM
great point, 9ms is ultra fast
Sep 15, 2022, 9:42 PM
yes globally available ip addresses wreck havoc with whois lookups.
You can see the region indirectly by inferring from clustername here:

$ curl -XGET -I  <https://scp71evy.apicdn.sanity.io> -H"X-debug: true"
HTTP/2 200
date: Fri, 16 Sep 2022 07:06:28 GMT
content-type: application/json; charset=utf-8
content-length: 19
clustername: kubernetes02-eu-w1-01
grace: 1200.000
x-sanity-orig-cache-control:
x-sanity-beresp-ttl: 0.000
x-varnish: 351237158
x-sanity-age: 0
x-served-by: varnish-2
x-cache: MISS
vary: origin
accept-ranges: bytes
via: 1.1 varnish (Varnish/6.0), 1.1 google
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

kubernetes02-eu-w1-01
is GCP europe-west1, aka Belgium.You should see
kubernetes02-sa-e1-01
which is GCP southamerica-east1, aka Sao Paolo.

We have to revisit the documentation for this somehow I think, it’s such an easy assumption to make that whois is accurate.
Sep 16, 2022, 7:11 AM
thanks a lot User and User, all clear 👍I see the clustername referring to "south america" from my end

curl -XGET -I <https://scp71evy.apicdn.sanity.io> -H"X-debug: true"
HTTP/2 200 
date: Fri, 16 Sep 2022 13:03:48 GMT
content-type: application/json; charset=utf-8
content-length: 19
clustername: kubernetes02-sa-e1-01
grace: 1200.000
x-sanity-orig-cache-control: 
x-sanity-beresp-ttl: 0.000
x-varnish: 16686871
x-sanity-age: 0
x-served-by: varnish-1
x-cache: MISS
vary: origin
accept-ranges: bytes
via: 1.1 varnish (Varnish/6.0), 1.1 google
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 
Sep 16, 2022, 1:07 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?