3

I have a web app currently running on App Engine (Python 3). It is always getting traffic (i.e., never needs to scale down to 0), and it could easily be deployed as container if necessary (i.e., either deployment option is fine).

App Engine is a bit expensive. I started researching Cloud Run as an alternative. One startling discovery is how much cheaper Cloud Run is:

That's a huge difference. Of course, Cloud Run will require setting up a load balancer which seems to be a much smaller part of the total cost than the compute part.

What are the other tradeoffs? What are the benefits of staying on App Engine?

jacob
  • 2,762
  • 1
  • 20
  • 49
  • 1
    You can run Cloud Run without a load balancer, if you don't need to combine multiple cloud run services under the same domain. – Pentium10 Aug 02 '22 at 17:10
  • 1
    Be aware that "some" python applications because of container cold start, will have increased latency. It might be not your use case, but python unfortunately is slow at handling module imports at cold start. https://stackoverflow.com/questions/66047311/slow-numpy-and-pandas-imports-on-google-cloud-run – Pentium10 Aug 02 '22 at 17:11
  • The app uses multiple custom domains under a single service, and also uses Identity-Aware proxy. Can that run without a load balancer? – jacob Aug 02 '22 at 17:12
  • if you need out of ordinary access like IAP support and more networking, then you need the load balancer. Although multiple custom domains can be set for the same service, I don't recall the exact quota number, but it's possible. – Pentium10 Aug 02 '22 at 17:15
  • Give it a go, and see if there is a big change. Also be aware that in Cloud Run, you could have multiple instances in parallel, and that costs X times the hardware. So occasionally you will have multiple instances rather than 1 fixed instance on App Engine. – Pentium10 Aug 02 '22 at 17:20
  • My GAE app loading latency is around 10-15 seconds. It's a huge Django app with a lot of dependencies. It's usually fine for auto scaling with a couple idle instances. – jacob Aug 02 '22 at 17:23
  • It's not so simple to "give it a go". I have a substantial service with paying customers, and can't afford to "move fast and break things". It would need to be planned out. There are certainly always multiple instances. There is never 1 fixed instance. – jacob Aug 02 '22 at 17:25
  • I guess I'm first trying to understand why GAE is so much more expensive. There much be some benefit, and I'd like to know what that is. – jacob Aug 02 '22 at 17:26

1 Answers1

3

You asked about some differences:

App Engine Cloud Run Notes
max_concurrent_requests 80 requests up to 1000 requests if the instance cpu/memory can handle serving all these
cross region load balancing not yet via GCLB
gzip response support is out-of-the-box your app needs to do GAE could be faster for some use cases
Background threads Yes Limited
SSH debugging Yes No
Pentium10
  • 204,586
  • 122
  • 423
  • 502
  • Are there any benefits to GAE? – jacob Aug 02 '22 at 17:33
  • Lets wait for others to respond, maybe we put together a great content. – Pentium10 Aug 02 '22 at 17:35
  • Up to 8 CPU and 32Gb of memory on Cloud Run. Container based, easy to deploy elsewhere (K8S, other cloud,...). Websocket/streaming supported on Cloud Run. No language limitation (including new versions) on Cloud Run. – guillaume blaquiere Aug 02 '22 at 20:17
  • It's important to note that there are two very different services for App Engine: Standard and Flex(ible). Standard is much more comparable to Cloud Run, in terms of performance/behavior/etc. I mention this because, in the table above, SSH debugging is only available in Flex. – msl Aug 04 '22 at 18:02