0

I have a need to reconfigure the custom domain name of my google app engine instance and I would like to have the SF community to review the plan.

The issue

When my project first starts as a google app engine, I have assigned 'www.mycompany.com' as the custom domain of the production instance of my GAE app.

As the project grows, we deployed a word-pressed powered managed VM to host blog posts and other marketing artefacts. The domain name is about.mycompany.com

It causes a lot of confusion to users because www.mycompany.com/home will reach the web app, but www.mycompany.com redirects users to about.mycompany.com. Once they reached about.mycompany.com, they have trouble to get back to www.mycompany.com/home

Summary: current configuration

www.mycompany.com/home: My web app www.mycompany.com/: redirects user away to about.mycompany.com about.mycompany.com: marketing stuff/blog

My Desired Configuration

  1. Map www.mycompany.com to existing about.mycompany.com
  2. Map app.mycompany.com to existing www.mycompany.com (the GAE instance)
  3. Redirect www.mycompany.com/home to app.mycompany.com/home

My Question:

Regarding step 3 above, Google app engine has very good built-in load balancing. I am reluctant to put any apache instance (the one in the wordpress server) in front of the GAE instance because it can be easily DDOS for example. How can I make it less likely to go down under load? Is there any other alternative.

Is there any other additional issue I am not aware of?

1

I'd first add the custom domain app.mycompany.com directly to the GAE app (not as a DNS redirect). This will allow the GAE app to serve both www (no impact to existing functionality) and app (new functionality).

Now check that the /home path points correctly on the WP VM site, but without pointing to www, which you plan to change (it already does on the GAE app site):

  • about.mycompany.com/home -> app.mycompany.com/home

You may also like to have links on both sites pointing to each-other, for easy cross-site navigation:

  • about.mycompany.com/app -> app.mycompany.com
  • about.mycompany.com/www -> about.mycompany.com
  • app.mycompany.com/app -> app.mycompany.com
  • app.mycompany.com/www -> about.mycompany.com

Now you can change the www.mycompany.com mapping from the GAE app to the WP VM. There should be no issue during DNS propagation, as regardless of which site www.mycompany.com points to its /home, /app and /about paths are redirected the right destination.

Now you can update the /www links, which would allow to eventually deprecate and drop the about.mycompany.com domain down the road:

  • about.mycompany.com/www -> www.mycompany.com
  • app.mycompany.com/www -> www.mycompany.com

While updating the above answer I just thought of another possibility :)

It appears that it is possible to run a Wordpress site on GAE. Plenty of docs on the subject: https://www.google.ca/?gws_rd=ssl#q=host+wordpress+on+google+app+engine

Which means it's possible to deploy your existing WP site as a separate service/module of your existing GAE app, which would make the whole story a lot easier and completely eliminate the scalability concern of the apache instance infront of the GAE app.

4
  • Thanks for the answer but I think you might have misread my question. www.mycompany.com/home is where the web app is at the moment. It is not the blog/frontpage. That's why I mentioned the need for using an apache frontend to rewrite the incoming url – Anthony Kong Dec 16 '16 at 1:32
  • OK, now you lost me :) You can only map a subdomain to an app, not just a sub-path under a subdomain. I mean if www.mycompany.com/home is the GAE app then www.mycompany.com is the same GAE app. – Dan Cornilescu Dec 16 '16 at 5:52
  • The subpath is of course not controlled by DNS. It is achieved via the app.yaml cloud.google.com/appengine/docs/python/config/appref – Anthony Kong Dec 18 '16 at 1:34
  • That's what I thought. But I think I missed your desire to keep www.mycompany.com/home pointing to the GAE app. I'll update the answer. – Dan Cornilescu Dec 18 '16 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.