App Engine to Compute Engine communication via internal IP

2,558 views
Skip to first unread message

Stephen Dunkley

unread,
Jun 24, 2016, 10:43:29 AM6/24/16
to Google App Engine
I have a Java Web application deployed on a Compute Engine instance connecting to MySql running on another Compute Engine instance in the same project. I am able to connect to MySql using the internal IP address (jdbc:mysql://10.240.0.4:3306/<db_name>).

If I deploy the same web application to an App Engine instance within the same project, I can only connect to the MySql instance via the extermal IP address (jdbc:mysql://104.196.148.141:3306/<db_name).

If I try to use the internal IP address, I get a Communication Link Failure, Permission Denied due to policy.

My question is how do I open up communication between an App Engine instance and a Compute Engine instance via an internal IP address? The performance is about 5 x faster when using the internal IP address.

Any help would be much appreciated

Adam (Cloud Platform Support)

unread,
Jun 24, 2016, 5:08:46 PM6/24/16
to Google App Engine
You should be able to do this if you use a Flexible Environment instance, and specify the same network name in the app.yaml that your Compute Engine instance running MySQL is on. It won't work for Standard Environment instances as they are on separate, physical networks.

I say "should" as I haven't played around with this, and there's an additional layer of network routing from the Docker container the app lives in which also has its own local subnet.

JITENDRA GANGWAR

unread,
Dec 29, 2016, 9:14:50 AM12/29/16
to Google App Engine
Thanks Adam for your answer , But  as per this documentation App Engine flexible environment is still in beta release , can it be used in production ?

Nick (Cloud Platform Support)

unread,
Dec 30, 2016, 4:53:53 PM12/30/16
to Google App Engine
Hey Jitenda,

The Flexible Environment can be used by any user, although of course being a beta product, it isn't covered by the same SLA's as other products. You should check our documentation including the terms of service, service level agreements, and the explanation of launch stages.

Cheers,

Nick
Cloud Platform Community Support

Lorne Kligerman

unread,
Jan 4, 2017, 1:25:40 PM1/4/17
to Google App Engine
As Adam mentioned, this is only possible right now with the flex.  However we do know this is a problem and are working towards a solution for standard, nothing more to report at this time.

Robert Dyas

unread,
Apr 13, 2017, 11:45:05 AM4/13/17
to Google App Engine
Being able to have App Engine standard access my GCE instances via their internal IP addresses would help us greatly. Hopefully this will also solve some of the speed/latency issues between App Engine standard and GCE resources.

AJ Ross

unread,
May 26, 2017, 4:24:01 PM5/26/17
to Google App Engine
Hey Lorne, thanks for the information. I have a "standard" instance and I'm migrating to "flex" in order to be able to open direct connections to a Kubernetes cluster. Good to know that this should work!

Robert Dyas

unread,
Jun 28, 2017, 6:07:33 PM6/28/17
to Google App Engine
Now that GAE Std Java 8 is in beta, is there any update on when this might become available for testing?


On Wednesday, January 4, 2017 at 1:25:40 PM UTC-5, Lorne Kligerman wrote:

Lorne Kligerman

unread,
Jun 28, 2017, 8:19:49 PM6/28/17
to Google App Engine
Not just yet.  We'll let you know when we're ready for early tests.
Thanks!

--
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/5RsoKIPWyTQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/b21223f6-8d58-4522-b369-a17744453b53%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Yang Yao

unread,
Aug 29, 2017, 4:35:34 AM8/29/17
to Google App Engine
Hi, Adam. I have tried using flexible instance to connect to a container engine which I created an internal load balancer. But this unfortunately does not work. (External load balancer does work.) Is there anyone could suggest? A detailed description of my troubleshooting process is posted here on stackoverflow.

Daniel Florey

unread,
Mar 9, 2018, 6:48:56 AM3/9/18
to Google App Engine
Any news? I've spend a lot of time to find information on how to access Compute Engine vial URLFetch from App Engine standard using internal IP.
Is this simply not possible (yet)?
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.

Niklas B

unread,
Jun 19, 2018, 2:53:51 AM6/19/18
to Google App Engine
Agreed, this would be very helpful. This would serve as a poor mans cloud functions until they get python and internal access. Looking for this on the Flexible environment. 
Reply all
Reply to author
Forward
0 new messages