title: Stitching Cloud Run microservices into single API gateway
body: <p>I have my services split into Cloud Run services, say e.g. in a blog application I have <code>user</code>, <code>post</code> and <code>comment</code> services.</p>
  
  <p>For each service I get a separate http endpoint on deploy, but what I want is to have api.mydomain.com act as a gateway for accessing all of them via their respective routes (<code>/user*</code>, <code>/post*</code>, etc).</p>
  
  <p>Is there a standard (i.e. GCP-managed and serverless-ey) way to do this?</p>
  
  <p>Things I've tried/thought of and their issues:</p>
  
  <ul>
  <li>Firebase hosting with rewrites - this is the 'suggested' solution, but it's not very flexible and more problematically I think this leads to double wrapping CDNs on every request.  Correct me if wrong, but Cloud Run endpoints use a CDN already, then you have Firebase hosting running through fastly.  Seems silly to be needlessly adding cost and latency like that.</li>
  <li>nginx on a constantly running instance - works ok but not managed and not serverless; requires scaling interventions</li>
  <li>nginx on Cloud Run - this seems like it would have highly variable performance since there are (a) two possible cold starts, and (b) again double wrapping CDN.</li>
  <li>using Cloud LB/CDN directly - seemingly not supported with Cloud Run</li>
  </ul>
  
  <p>Any ideas?  For me this kind of makes Cloud Run unusable for microservices.  Hopefully there's a way around it.</p>