问题描述
阅读
但这似乎并不是GAE微服务如何工作的准确描述?有没有像主控制器的默认服务,设置顶级配置或做某种路由?如果我只是运行一大堆非web应用程序(意味着可以在预定的流程数据上运行的应用程序)和用于接受Web请求的前端应用程序,那么为什么我仍然需要创建默认服务?
原因是还有几个应用程序级配置,适用于所有服务/ modules:
如果没有这些配置,有些配置可能会有问题在默认服务之后部署/一起部署。一些服务可能依赖于应用程序级别的配置。
首先部署 default 的要求只是简单的采取措施降低初始部署问题的风险。后续部署不再有此限制(因为已经部署了 default )
是,默认服务是强制性的(有点像各种东西的厨房水槽,例如不符合任何调度规则的请求被发送到默认服务)。因此,只要将其中一个非web应用程序声明为默认的应用程序即可(默认的服务实际上并不重要)。
以某种方式相关(主要用于示例):
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中部署多个服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!