8 Replies
Get your location can be done by fetching https://cloudflare.com/cdn-cgi/trace, it includes a colo field which will tell you where the DO is located
As for moving, that's not possible. You'll need to create a new object (potentially with a location hint) to have that
oh, this api dosn't accept any param like DO id, so it means all the DOs created by my workers are in the same location?
It's not an API - it shows you request information, which in this case would show the colo where your DO is.
ok I see, that means if the DO creation process was trigger by my request, then it will created in that colo location right?
No - you need to request that endpoint inside of your Durable Object
oh I see, I will try it
Hi kian, I got the location result, but where do they mean?
colo=SEA
colo=SJC
colo=LAX
They're IATA codes for airports. Cloudflare's colos are identified by the nearest airport.
LAX is Los Angeles International, for example.
I find it, thank you very much sir!