GoogleCloudPlatform / python-docs-samples

Code samples used on cloud.google.com
Apache License 2.0
7.35k stars 6.4k forks source link

issue when using global variable in app engine #2568

Closed researchar closed 4 years ago

researchar commented 4 years ago

how to share global variables in multiple instances in app engine

andrewferlitsch commented 4 years ago

@leahecole Does this need to be assigned to someone?

kurtisvg commented 4 years ago

@researchar The only way to preserver global state is to use an external datasource. Some good examples with App Engine are Firestore, Cloud Memorystore, or Cloud SQL.