简体   繁体   English

扩展非默认版本的Google App Engine后端

[英]Scaling non-default version of Google App Engine Backend

I have a live app that uses Google App Engine (python) for the backend. 我有一个使用Google App Engine(python)作为后端的实时应用程序。 The app is pointing https://my-app.appspot.com . 该应用程序指向https://my-app.appspot.com Because the API has changed significantly, I've set up a new version of the backend, 'v2', and am pointing the new app to https://v2.my-app.appspot.com . 由于API发生了重大变化,因此我设置了后端的新版本“ v2”,并将新应用程序指向https://v2.my-app.appspot.com

I see now in the docs, that for min_idle_instances it says The minimum number of idle instances that App Engine should maintain for this version. Only applies to the default version of a module, since other versions are not expected to receive significant traffic 我现在在文档中看到,对于min_idle_instances它说The minimum number of idle instances that App Engine should maintain for this version. Only applies to the default version of a module, since other versions are not expected to receive significant traffic The minimum number of idle instances that App Engine should maintain for this version. Only applies to the default version of a module, since other versions are not expected to receive significant traffic

The problem is that I was hoping to launch the new Android version before the iOS version, since iOS takes longer to go through their review process. 问题是我希望在iOS版本之前启动新的Android版本,因为iOS需要更长的时间才能通过其审核过程。

So, is there any other way to ensure scalability of the new version without making it the default version? 那么,还有其他方法可以确保新版本的可扩展性而不将其设置为默认版本吗? If not, is there any way to route the old traffic to a non-default version? 如果没有,有什么方法可以将旧流量路由到非默认版本?

So it seems I can solve this problem using modules, which I switched a lot of my code to anyways for this iteration. 因此,看来我可以使用模块解决此问题,无论如何我都将许多代码切换到此迭代中。

Each module is capable of having its own default version. 每个模块都有自己的默认版本。 So, the first version of the app can still hit https://my-app.appspot.com , (and that will stay the default module and default version, with its own min_idle_instances ). 因此,该应用程序的第一个版本仍可以访问https://my-app.appspot.com (并且将保留默认模块和默认版本,并带有自己的min_idle_instances )。 The second version of the app switches what was the default module to being the api module. 该应用程序的第二个版本将默认模块切换为api模块。 So that version can hit https://v2-dot-api-dot-my-app.appspot.com , and v2 can be default version of the api module, with its own min_idle_instances 因此该版本可以访问https://v2-dot-api-dot-my-app.appspot.com ,而v2可以是api模块的默认版本,具有自己的min_idle_instances

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM