4 ms·
I'm about to launch a new website and would like to start using AWS or GCP. Between Fargate and Cloud Run, which one would you recommend? (It's a simple React +
by slig 7y ago
I'm about to launch a new website and would like to start using AWS or GCP. Between Fargate and Cloud Run, which one would you recommend? (It's a simple React + Django + Postgres + Redis project) Thanks!
- cameronbrown 7y agoI personally make heavy use of classic App Engine tbh, the experience is pretty similar to Cloud Run but it's much more of a mature platform (if you can deal with the downsides).
- slig 7y agoI used App Engine years ago, but didn't even consider it nowadays exactly because it's mature and I fear Google might sunset it soon. Will have a look now, thanks!
- evankanderson 7y agoApp Engine is still GA and is still having features added. Disclaimer: I work on both Cloud Run and App Engine at Google.
- ernsheong 7y agoAgain false perception issues, GCP is not Google consumer product. GCP rarely sunsets products already in GA (for now).
- ZeroCool2u 7y agoAppEngine is great! Plus, I just finished making an auto deploy to AppEngine Workflow with GitHub Actions last night, so I can just push and auto deploy if all tests pass!
- samblr 7y agoIf its open source - could you please point it.
- ZeroCool2u 7y agohttps://gist.github.com/ZeroCool2u/c818f89906c9b46d28cb7de85a2860ce https://gist.github.com/ZeroCool2u/c818f89906c9b46d28cb7de85... The project I created it for isn't public yet, but I made a gist that provides an example workflow and the steps required to make it work.
- samblr 7y agoThank you
- ZeroCool2u 7y agoAbsolutely, happy to help!
- ZeroCool2u 7y agoIf anyone happens upon this and finds it useful, I've created a public repository that demonstrates how to auto deploy if unit tests pass: https://github.com/ZeroCool2u/Python-Deploy-To-Google-App-Engine https://github.com/ZeroCool2u/Python-Deploy-To-Google-App-En...
- minimaxir 7y agoCloud Run is not for hosting websites (edit: in most cases, see reply below), it's for bespoke API commands with a bit more flexibility than Lambda/Cloud Functions due to greater environmental control.
- slig 7y agoI read somewhere that it was comparable to Fargate and got confused. Thanks for clarifying it!
- evankanderson 7y agoCloud Run is a perfectly reasonable choice for hosting websites -- it's a serverless HTTP platform that uses containers as the base packaging and runtime infrastructure. Unlike something like Fargate, it supports automatic scaling of containers based on requests, so it will run zero containers if you get no traffic, and 100 containers if you get (for example) 1500 requests per sec. The fully-managed version has a pay-per-100ms of execution model, while the GKE-hosted version uses an existing GKE cluster you provide.
- slig 7y agoHi, thanks for the clarification, I'll give it a try then!
- minimaxir 7y agoIt's stateless, which won't allow many user authentication/CRUD workflows, although recently they added integration with Cloud SQL which is interesting. Don't think you could use Django on Cloud Run without issues, though, particularly with how it handles Sessions.
- alpb 7y agoI disagree. If you're doing any modern architecture with microservices using containers, you're primarily doing stateless things (even if it's your web frontend) and pushing the state off to somewhere like Redis/memcached/database. You basically implied that web frontends don't run in a load-balanced multi-replica set up, which is not true. Similarly from what you said one might think people don't deploy web frontends to Kubernetes (where containers come and go all the time as they're ephemeral, due to events like crashes, autoscaling), which is also not true. If you’re writing anything that scales (i.e. has multiple replicas), then you actually store any significant state wrt logins/sessions on your app and you push it out to an external storage. Most web frameworks offer libraries or middleware that let you persist this "state" in external storage.
- ernsheong 7y agoCloud Run is great if you don't need something that's always on (e.g. websockets). For the Postgres part you still need Cloud SQL. It is also much simpler compared to Fargate (perceptually, haven't actually tried Fargate nor would want to, happy GCP user)