简体   繁体   中英

Google App Engine host routing

I'm trying to deploy an Google App engine app with this setup:

www.domain.com -> Wordpress Frontend
app.domain.com -> AngularJS Backend
api.domain.com -> Rest API used by Angular Backend

Can I achieve this using the basic app schema? Or should I use the modules API ?

My main worry about using modules is that they use different instances, increasing the billing. Am I correct?

Modules API is your best bet in this case. You can set automatic scaling to all modules so that new instances are only spun up when there's requests.

It's completely up to you...

  • Depending on how you structure your project you could do it in either way but of course with Modules things would be a lot nicer organized, although yes, it would increase your monthly bill, while with a single default module your bill would likely to be smaller but your code organization - messier.

  • If " api.domain.com -> Rest API used by Angular Backend " uses any backend language other than PHP (Wordpress) then you would have to run them as two separate modules/projects since you cannot have both PHP and Python/Java/Go runtimes on the same instance.

  • If your " app.domain.com -> AngularJS Backend " part consists of static files only and no backend code (php/python/go/java) then that wouldn't require running instances as everything would be served from Google's frontend servers and not directly from your instances (the static files are normally not even included with the code you deploy unless you specify that you want that in app.yaml ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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