Using Third-Party Databases

From Google App Engine, you can easily access other Google Cloud Platform services such as Cloud Datastore, Cloud SQL, and Cloud Storage. However, you can also choose from a variety of third-party databases to use with your applications such as Redis, MongoDB, PostgreSQL, Cassandra, and Hadoop.

You can use any third-party database supported by your language if the database is accessible from the Google App Engine instance. These third-party databases can be hosted on Compute Engine, hosted on another cloud provider, hosted on premises, or managed by a third-party vendor.

Hosting on Compute Engine

Many popular third-party databases such as Redis, MongoDB, PostgreSQL, Cassandra, and Hadoop, can be quickly deployed to Compute Engine using the Cloud Launcher. There are also detailed guides on deploying MySQL and PostgreSQL.

Notice that instances in the App Engine standard environment cannot access Compute Engine via internal IP addresses: access must go through the public internet. In comparison, App Engine flexible environment instances are part of the same private internal network as Compute Engine instances, so App Engine flexible environment applications can communicate with services hosted on Compute Engine within the same project without going through the public internet.

Other cloud providers

App Engine applications can connect to databases hosted on other public clouds if the database server and firewall are configured properly to accept connections. Your App Engine application connects to the database using the service's public IP address.

Databases managed by a third-party vendor

There are many vendors offering managed database services such as mLab for MongoDB. These vendors handle hosting, configuration, and maintenance of databases. App Engine can connect to these services in the same way as other public clouds, via the service's public IP address.

On premises

If you have existing on-premises databases that you want to make accessible to your App Engine application, you can configure your internal network and firewall to give the database a public IP address.

Notice that flexible environment instances have the same VPN support as Compute Engine instances, whereas standard environment instances do not support VPN connections.

Production considerations

App Engine can be configured to automatically scale your application horizontally based on various metrics. Unlike web applications, databases often require non-trivial changes to respond to scale. In production applications, App Engine can quickly overwhelm a database during traffic spikes. You should take the anticipated average traffic load and load during spikes into consideration when configuring and deploying databases.

Send feedback about...

App Engine standard environment for PHP