Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Google App Engine make a http request to a Compute Engine instance within the same project without an external IP?

In App Engine I'd like to make http fetch calls to a web server running on an Compute Engine instance, created within the same Google cloud project, and I'm wondering if I can make such calls to the instance without enabling an external IP for it? Are App Engine and Compute Engine instances, from the same project, within the same network and can I call a Compute Engine instance by name from App Engine?

like image 230
Bjorn Thor Jonsson Avatar asked Nov 19 '13 00:11

Bjorn Thor Jonsson


1 Answers

The best way to solve that in the short/medium term is to deploy the VM as a VM-based backend (we are accepting TT applications). You can deploy the VM backend as a different App Engine module of the app. Then you can urlfetch "mymodule.myapp.appspot.com" from the frontend and it will hit your VM without going through the public IP.

You can also serve your app straight from the VM backend. There you can load classes that are blocked by the normal App Engine sandbox (and well as have full access to all App Engine APIs!). The downside with VM backends is that we don't have auto-scaling yet.

like image 84
isdal-goog Avatar answered Oct 06 '22 01:10

isdal-goog