Why do I need to deploy a “default” app before I can deploy multiple services in GAE?

纵然是瞬间 提交于 2019-11-26 06:49:40

问题


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?


回答1:


The reason is that there are also several app-level configs, applicable to all services/modules:

  • dispatch.yaml
  • index.yaml
  • queue.yaml
  • cron.yaml

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?



来源:https://stackoverflow.com/questions/42360790/why-do-i-need-to-deploy-a-default-app-before-i-can-deploy-multiple-services-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!