http route url parts to different server

2019-08-24 06:02发布

问题:

I'm not sure what the correct verbiage is for this question, but here it goes.

I want to set up two web applications. One is based on golang and the other is apache/php (wordpress)

These applications will be hosted as separate google cloud platform API engines.

I would like these to be published under the same domain, so for example the main golang app URL would be www.mygolangapp.com and the wordpress url would be www.mygolangapp.com/blog

I'm thinking I may need to setup a google VPC network. Could anyone confirm this, and/or provide better options?

回答1:

The choice of options depends on which compute system you are using:

  • Google App Engine - GAE has build in request routing which allows you to have different URLs served by different "modules" or "versions".

  • Google Compute Engine - on GCE you can use Cloud HTTP Load Balancing to do Content-Based Load Balancing to send different paths to different instance groups.

  • Google Container Engine - on GKE you can create an Ingress with fanout, to send different paths to different pods.