Django apps that run on Google Cloud are running on the sameinfrastructure that powers all of Google's products, which generally improvesthe application's ability to adapt to a variable workload.
Hosting platforms
These are the available options for deploying Django on Google Cloud:
Django deployment option | Get started |
---|---|
App Engine standard environment | |
App Engine flexible environment | |
Cloud Run | |
Google Kubernetes Engine (GKE) | |
Compute Engine |
For more details on the differences in these platforms, see App Hosting options on Google Cloud.
Databases
The Django object-relational mapper (ORM) works best with an SQL relationaldatabase.
If you are starting a new project, Cloud SQLis a good choice. You can deploy a PostgreSQL or MySQL database that's managed and scaled by Google, and supported by Django.
You can deploy Django with a Spanner backend using the python-spanner-django database backend.
Sometimes, there are compelling reasons to use a NoSQL database. Using the Django ORM with aNoSQL database is possible, with some limitations, but not officially supported by Django. There are a number of community-supported backend connectors Datastore, including djangae if you're using App Engine, or django-gcloud-connectors if you're using Cloud Run. If you choose to use MongoDB, you can deploy it using Cloud Marketplace and do your own management, or you can use the managed MongoDB hosting serviceprovided by mLab.
Caches
Memorystore offers managed hosting options for both Memcache and Redis. For App Engine, see the guide for migrating from Memcache.
Task queuing
Pub/Sub offers messaging for event-driven systems, and Google Tasks offers asynchronous task execution; see the guide for choosing between Google Tasks or Pub/Sub. For App Engine, see the guide for migrating from Task queues.
Support for task queuing through Cloud Tasks is available through a number of community-supported packages.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-05 UTC.
[{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]