1

I use google managed-VMs. My module has several instances. I need to perform a HTTP call on each of these instances. Hence, I would like to know if there is a way to specify the recipient instance in the URL.

For instance I tried: http://<instance-name>.<module-name>.<project-name>.appspot.com/ without success.

François Kawala
  • 436
  • 3
  • 18

1 Answers1

2

You're missing a <version-name> in there:

http://<instance-name>.<version-name>.<module-name>.<project-name>.appspot.com

See https://cloud.google.com/appengine/docs/python/modules/#Python_Application_hierarchy for more details (this is the page for Python, but it applies across-the-board.

Zachary Newman
  • 20,014
  • 4
  • 39
  • 37
  • 2
    And `https://-dot--dot--dot-.appspot.com` if you want to use HTTPS. – Doug Richardson Sep 14 '15 at 19:48
  • 2
    Thanks, Doug. In this case, that will probably break down, because DNS name labels are [capped at 63 characters](http://tools.ietf.org/html/rfc2181#section-11), and you'll have to revert to using the `.`-separation. This is bad, because the cert won't match, but there's not an easy solution here. – Zachary Newman Sep 14 '15 at 20:29
  • Woa, good point. I wasn't aware of the 63 character label limit. One approach is to limit the version, module, and project names, which you have control over and hope for the best with the instance-name. Yuck. – Doug Richardson Sep 14 '15 at 23:09
  • In my case `` is an integer an integer in `[0,n[` where `n` is the number of instances. Is that the expected behavior, or do I miss something ? – François Kawala Sep 15 '15 at 08:54
  • With the new (not yet stable) Managed VMs, instance names look something like `gae---`, and are thus quite long. But yes, yuck indeed. – Zachary Newman Sep 15 '15 at 14:07