<p>Starting point: I have a universal JS app (built on Next.js, Nuxt.js, Universal Angular, etc.) and I want it to be up &amp; running on GCP (I think the same question can refer to AWS, principles are the same). The app is not a &quot;real&quot; back-end (with db connections, business logic, etc.), it's more kinda &quot;frontend-backend&quot; - all it does is only SSR of frontend. The app is containerized using Docker. The application should be production-ready (shouldn't be deployed on some beta services).</p>
<p>I have encountered 4 possible options:</p>
<ol>
<li>Compute engine</li>
<li>GKE (Kubernetes)</li>
<li>Cloud Run</li>
<li>App engine</li>
</ol>
<p>The question is next: what is the GCP service, that best fits this app's need?</p>

bohkoval
<p>I'm a big fan of Cloud Run, and I can't recommend you another best place. But why in words</p>
<ul>
<li>Compute Engine: Traditional server with all the boring things to manage yourselves (High Availability, backups, patch/update/upgrade). And don't scale to 0. for HA you need 3 VM (at least, in a same zone). Quite expensive.</li>
<li>GKE: Very similar to compute engine. In addition you need skills on K8S.</li>
<li>AppEngine: great solution, but less customizable as Cloud Run. In addition, you can't serve directly container on App Engine standard, it's only possible on the flex version, custom runtime (you don't scale to 0, but to 1); the main advantage here, is the easier server management compare to Compute Engine, and a native regional HA included.</li>
</ul>
<p>For Cloud Run, Cloud Function and App Engine (standard version with automatic/basic scaling mode), the service can scale to 0. Thus, when a request come in, the service is started and took a while before being able to serve the request (about 300 -&gt; 500 ms, except if you use an heavy framework, like Spring Boot, it takes several seconds).</p>
<p>If this cold start is a problem, you can set a min instance to keep warm one instance and thus to discard this cold start.</p>
<ul>
<li>You can't do this with Cloud Functions</li>
<li>App Engine, you pay, without discount, the unused instance (kept warm but not serving traffic)</li>
<li>With Cloud run, you pay 10x less the instance cost when it's idle (90% of discount).</li>
</ul>
<p>Sadly the min-instance on Cloud Run is still in Beta (I'm sure it will be very soon in GA, but it's not today &quot;production ready&quot; as you say.</p>
<p><em>Note: from my experience, Beta version are production ready, you simply don't have financial compensation in case of issue</em></p>
<p>IMO, I recommend you to have a test on Cloud Run (which is in GA) without the min instance param and see if the cold start is a real issue for you. If it is, you have the beta param, but it's possible that it will be GA when you consider it!</p>
