问题描述
阅读
但这似乎不是对 GAE 微服务如何工作的准确描述?是否有像主控制器默认"服务那样设置顶级配置或进行某种路由?如果我只是运行一堆非网络应用程序(意味着将在预定和处理数据上运行的应用程序)并且不需要用于接受网络请求的前端应用程序",那么为什么我仍然需要创建默认服务?
原因是还有几个应用级配置,适用于所有服务/模块:
如果没有在 default
服务之后/一起部署,其中一些配置可能会出现问题.并且某些服务可能依赖于应用级别的配置.
首先部署default
的要求只是一种降低初始部署问题风险的措施.后续部署不再有此限制(因为 default
已部署)
是的,default
服务是强制性的(有点像厨房水槽,可以处理各种东西,例如与任何调度规则不匹配的请求被发送到 default
服务).因此,只需将您的一个非网络应用程序声明为默认应用程序(default
服务实际执行的操作无关紧要).
以某种方式相关(主要用于示例):Google App Engine 应用中的默认服务/模块在文件夹结构方面可以是非默认服务/模块的同级吗?
Reading this doc it says "You must initially deploy a version of your app to the default service before you can create and deploy subsequent services."
I don't understand this because I thought the GAE microservices were separate things as in:
But it seems this is not an accurate depiction of how GAE microservices work? Is there like a master controller "default" service that sets top level config or does some kind of routing? If I'm just running a bunch of non web apps (meaning apps that wil run on a scheduled and process data) and a frontend "app" for accepting web requests isn't necessary than why do I still need to create the default service?
The reason is that there are also several app-level configs, applicable to all services/modules:
Some of these configs can have trouble if not deployed after/together with the default
service. And some services may have dependencies on the app-level configs.
The requirement of deploying default
first is simply a measure to reduce the risk of initial deployment problems. Subsequent deployments no longer have this restriction (since default
is already deployed)
Yes, the default
service is mandatory (sort of like a kitchen sink for all kinds of stuff, for example requests not matching any dispatch rule are sent to the default
service). So just declare one of your non-web apps the default one (it doesn't matter what the default
service actually does).
Somehow related (mostly for the examples): Can a default service/module in a Google App Engine app be a sibling of a non-default one in terms of folder structure?
这篇关于为什么我需要部署一个“默认"?应用程序之前我可以在 GAE 中部署多个服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!