Application Data Center/Zone

64 views
Skip to first unread message

Miguel Vitorino

unread,
Jul 21, 2014, 8:00:26 AM7/21/14
to google-a...@googlegroups.com

Hi,

How is possible to know the current Zone (as in: us-central1-a, b, f) where an AppEngine application is currently running?
Cloud SQL allows us to specify that its location should follow an AppEngine app, but for general GCE instances there isn't a similar option (since they obviously aren't managed so static to one zone...)
We would like to create GCE instances in the same zone as the app to reduce latency.
One way we thought of was to start one instance in each zone and then test the latency but we would naturally prefer a simpler approach to find this out...

Vinny P

unread,
Jul 22, 2014, 12:56:29 AM7/22/14
to google-a...@googlegroups.com
On Mon, Jul 21, 2014 at 7:00 AM, Miguel Vitorino <mvit...@gmail.com> wrote:
How is possible to know the current Zone (as in: us-central1-a, b, f) where an AppEngine application is currently running?
Cloud SQL allows us to specify that its location should follow an AppEngine app, but for general GCE instances there isn't a similar option (since they obviously aren't managed so static to one zone...)


Some runtimes (I'm not sure if all runtimes support this) can supply a name of the hosting datacenter. For example, in Go you can call appengine.Datacenter() and get back a string similar to us3.


-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com


Miguel Vitorino

unread,
Jul 22, 2014, 3:06:26 PM7/22/14
to google-a...@googlegroups.com

Thanks Vinny, I didn't know and will definitely take a look at that.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/xr5W6HvWVFE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Miguel Vitorino

unread,
Aug 5, 2014, 12:56:13 PM8/5/14
to google-a...@googlegroups.com
We never seem to get anything other than us3. And couldn't find a correlation with us-central1-a, b, etc.
Thanks anyway Vinny.

Miguel Vitorino
Reply all
Reply to author
Forward
0 new messages