title: Serve static SPA from Google Cloud Storage and API from Google App Engine
body: <p>I have a static web client SPA serviced by a REST API.  I'm trying to figure out the best way to host these apps on Google's Cloud Platform using App Engine to host the API, and Cloud Storage to host the static web client.</p>
  
  <p>If I were doing this from scratch, a simple reverse proxy could manage routing traffic between the API and the client assets.  To do the equivalent with GCP, I've looked at the following:</p>
  
  <ul>
  <li>Google's Compute Engine supports <a href="https://cloud.google.com/compute/docs/load-balancing/http/adding-a-backend-bucket-to-content-based-load-balancing" rel="noreferrer">content-based load balancing</a>: though no equivalent for App Engine</li>
  <li>the API on App Engine could proxy requests to Cloud Storage, though at the expense of unnecessary load on the API service</li>
  <li>simply host the API and client on separate domains (App Engine and Cloud Storage respectively), and properly configure cross origin issues</li>
  <li>Use <a href="https://cloud.google.com/endpoints/" rel="noreferrer">Google Cloud Endpoints</a> as a reverse proxy to route traffic appropriately between App Engine and Cloud Storage: haven't fully explored this option, though as of writing, Cloud Endpoints does <a href="https://cloud.google.com/endpoints/docs/openapi/openapi-limitations" rel="noreferrer">not support routing to multiple hosts</a> (which is defined only in v3 of the OpenAPI spec).</li>
  </ul>
  
  <p>All of the above have limitations. What i'm trying to do seems fairly conventional, but I'm not sure what the path of least resistance is on GCP.</p>