I run a number of small websites on AppEngine. Mostly static files, occasionally a little bit of code.
I constantly hear that Cloud Run is superior to AppEngine... is it for my use case?
I don't think cloud run has a nice way to serve the static files, is that correct?
This is my first time deploying an application for production, so pls bear with my naiveness.
I have a springboot rest api, and am planning to host it on GCP, the problem is i cannot seem to understand the difference between cloud run and app engine standard. It seems like they are the same thing, with the only difference being cloud run supports docker containers?
-
They are both serverless computing services, abstracting the hardware and os away from the user, unlike GCP where you have to manually specify everything.
-
They can. both automatically scale up depending on requests, and they both also scale down to 0, saving you runtime costs.
-
They both respond to http requests.
-
Both offer free SSL certificates? i guess?
this video made me even more confused -> https://www.youtube.com/watch?v=2tLXKCgqwLY&t=265s
So i really cannot find any difference here, since they both seem to cost the same. For example in. my use case:
-
I dont need docker containers, my development team is literally 3 people and we dont need docker to ensure we all have the same runtime enviroments, so this takes away cloud run's one advantage.
-
Its a stateless rest api, both app engine and cloud run seem to be made for this.
-
It will run for only 12 hours a day, thereby scaling to 0 is a good idea to save money from iddle running the 12 other hours. They both scale to zero too.
Another follow up question is that my app takes about 10-15 seconds to start the application. Does this mean if i deploy to app engine standard, and the app engine decides to spin up a new instance to handle a http request, it will have to start a new "instance" of the application? which will take 10-15 seconds? Or is there some magic going on where it can start a new "instance" of my application faster? Does this apply to cloud run as well? Or is this where the difference lies? Any insight would me much appreciated as I'm really lost here.
Videos
The black box effect/inability to SSH into my instance is getting on my nerves. Anyone here running web servers on compute engine? Are there many gotchas?
Hi Community,
I am migrating an app from App Engine Standard to Flexible when suddenly, I came across an article which suggests that Cloud Run is preferred option for running containerized apps. These are the following Cloud Run advantages I understand so far:
-
Scales to 0 instances
-
Free tier
-
Supports containers
With this said, is there a reason why Flexible Env is preferred over Cloud Run? I am trying to determine whether Cloud Run is indeed a better option for running containerized apps and why.
Thank you.
The main difference is Cloud Run only executes when there is a live request on the wire, i.e. you are actually serving an HTTP request. As soon as the last socket closes/the last client disconnects, your container hibernates and does virtually no background processing what-so-ever.
If you're only ever doing work based on an HTTP request, then Cloud Run is definitely the way to go. Otherwise, if you have background tasks that run internally, you'll want to stick with AEF.
Think of cloud run as a more refined version of App engine flexible, Google first launched app engine standard waay back in 2008, as one of the first PaaS Google Cloud was pushing. Then in 2016 due to popular demand and the rise of containers, Google released app engine flexible, which is basically app engine but with a bunch of stuff changed due to the demand for container support mainly. Cloud run was released in beta only very recently in 2019, and is a service that is built around containers. It offers a bunch of new features and whereas app engine flexible can be thought of as app engine + a bunch of tweaks for container support, cloud run was built for containers, and imo google is slowly trying to transition its users from app engine flex to cloud run. So the logical choice for your use case in my opinion is to go cloud run.
Hi, I'm studying Google Cloud because I want to work in it in a near future but I have a problem to understand the advantages to use a Compute Engine over an App Engine. If I have understood, App Engine is a solution to deploy web applications where Computer Engine is more a virtual machine that need some customization/maintenance by the developer (or similar professional people).
My question is: because I want use the cloud also to have a standard solution in the infrastructure managed by other people (so, I have no costs in resources in maintenance), in which situation I should prefer a Compute Engine over an App Engine? The first response is that a Compute Engine is more useful in not-web applications like batch or database, but Google cloud already offer specialized solutions respectively in Batch (managed service) and Cloud Spanner ( or Datastore or Cloud SQL).
Do you have sometimes choose a Compute Engine despite the configuration of the VM at your charge?
Hi everyone, hope you're doing well and thanks for clicking on here.
I'm building a Node.js API and want to take advantage of the serverless solutions which Google Cloud offers.
Just for context, my previous experience with application deployment involved uploading the files via GitHub to a single server with a Plesk management panel, and connecting the domain to that site.
So, when it comes to looking at serverless, it's a little bit of uncharted territory for me and I've not been able to get straight answers in my research.
I want to build out a Node.js/Express API in a single project with the endpoints controlled entirely through Express Routes. That bit I'm fine with and have a working prototype running locally. However, I'm not sure whether Google Cloud's serverless solutions are appropriate for this and which I should use?
From what I can see, Google Cloud Run is geared towards microservice applications, where each microservice is its own endpoint contained within a Docker Container. This is an architecture I would like to avoid as it would add significant overhead to how my team currently works (maybe something to check out in the future when time permits).
However, I can also see they have Google App Engine, offering a similar service. Some information I've seen suggest this is a legacy service and that Cloud Run is the way forward. However, is Google App Engine suitable for non-microservice applications where Cloud Run is not?
Any pointers would be greatly appreciated, even if you have maybe some resources you could link me which helps to break it down and explain the differences in this context?
Thank you in advance.
So because of an accident with Auto ML I only have 50 USD $. I want to deploy a small flask angular website that does simple things. Which is better for this. I don't want to be charged since I'm only learning at this stage. Ultimately I'll probably try and make a simple Application that shows you the data values from IOT devices. I am familiar with Docker and stuff. App Engine and Cloud Run seem similar.
They both scale to zero and they both host apps whose front-end is an HTTP server.
Cloud Run operates purely on a Docker container level whereas AppEngine doesn't have that intermediary. Cloud Run bills to the millisecond whereas AppEngine bills to the minute, and they bill on instance CPU/RAM allocation time.
There are a couple of other caveats but they're not really worth exploring from a high level.
Create another account...
I'm looking for what I would call "managed VMs". Something as easy to deploy as App Engine or Cloud Run, but running permanently like a Compute Engine's VM as I will be deploying a stateful server with persistent storage. Reading this I don't think Cloud Run is a good match, and App Engine is quite similar.
It seems that there is no in-between. Or is there something that I missed? I would like to avoid managing VMs as much as possible (updates, permissions, etc).
Thanks.
So I started spinning up some services, and I've used ElasticBeanstalk in the past, so I thought app engine would be nice to play around with. Well that playdate for a single elixir service, with a single endpoint, with probably like 3 test requests made to it has cost me nearly $50 just over the weekend. What the actual fuck. I've had an EB instance running since 2021 that I think cost that much in a year. They're charging me for flexible core hours, the build times were abysmally slow, and I had 0 minimum instances. I removed the service yesterday because I had a production version running on cloudrun anyways (for less than 0.1% of the cost). I can't find any legitimate cost breakdown around this either to make sense it. If I just let this shit run, I would've had an unused test server cost me > $400/mo!
Hi All
I'm about to publish a NextJS (React) Project to GCP. Initially I wanted to go with Cloud Run and Github Actions. But now I saw an article that the same thing can be achieved with App Engine. It seems more straightforward to me since I don't need to dockerize the app.
Both services (Cloud Run & App Engine) seem to have the same featuresets (Run on Nodejs, SSR and so on). One thing I read is that App Engine might cost a bit more than Cloud Run but this is not something I care about for now.
Looking at the amount of tutorials online, people tend to prefer Cloud Run instead of App Engine and I'm not really sure why.
Sidequestion: My Project has a lot of ENV Variables. With Cloud Run you can as far as I know include them in your dockerfile or use "Variables & Secrets" on GCP.
I have a NestJS application that I need to get production-ready ASAP. This is my first foray into cloud computing, and I have limited knowledge of containers and container-management solutions. I'm a decent Node.js developer that just has to get some stuff done - so learning curve is one of the parameters here.
There are two feature differences on the Compute products "Hosting options" page that are different and of interest to me, and I have some questions about them.
First, I see that Cloud Run can scale-to-zero and Compute Engine cannot. I understand the difference - but an implication that I don't understand is: when Cloud Run has scaled-to-zero, is there a "warm up" period? I'm not even sure if this is a good question, or is a concern. For a lightweight web application, is there likely to be much performance increase in Compute Engine over Cloud Run? As my primary audience is US professionals and it's a work-related product, I anticipate that the highest load will occur from 7 AM EST to 11 PM EST (accounting for West Coasters).
The other parameter of note is that of persistent disks: Compute Engine has that property and Cloud Run doesn't. My application is a pretty simple CRUD application and I don't cache any data - so is this a feature I need to keep in mind?
Lastly - provisioning. I honestly have no idea how to go about determining how much compute power I need. Right now, my application has zero users. But with a little luck, I could be onboarding tens of thousands of users by months-end (the connections are in place - all my company needs is the app).
I'm flying by the seat of my pants here - I haven't done any analysis on potential memory leaks - should I be concerned with possible downtime on Compute Engine or crazy charges on Cloud Run? If I pick Compute Engine, I'm happy to restart instances to mitigate any memory leak concerns until I can address potential issues.
As is plainly obvious, I'm a little out of my depth. I'm coming from being an HTTP route developer to running the show. Any advice or feedback is greatly appreciated.
Edit to add: It seems like I missed App Engine. I'm looking into that now.
Edit again to add: Looking at the App Engine instances, I decided it was probably important to try to figure out what sort of resources my server is using. On my local machine, the server is using 1.2 GB at rest. If I go with App Engine, do I need to pick instance classes that have memory limits near this? That would be F4 or B4 instances - and I suppose the only difference between the two is the scaling type?
Edit my edit: It turns out that I was assessing memory usage on the wrong server - when I build the server and run THAT (as opposed to whatever happens when I run "nest start --watch"), the memory usage is 160 MB. I can deal with that.
I'm new to GCP and a bit confused between Cloud Run, App Engine, and Cloud Functions. We want to build a fully-fledged social media app similar to instagram for our startup.. The backend will be in Node.js and consist of high computations and lots of APIs..
Here's my requirement
Concurrent Users:
Maximum 10 users per project
Assuming 100 active projects, total concurrent users: 1,000
WebSocket Connections:
1 WebSocket connection per user
Total WebSocket connections: 1,000
HTTP Requests:
Estimated 50 HTTP requests per user per hour
Total HTTP requests per hour: 50,000
WebSocket Messages:
Estimated 100 messages per user per hour
Total WebSocket messages per hour: 100,000
Data Storage:
Assuming 1MB per project snapshot
100 active projects with 10 snapshots each: 1GB
Additional storage for user data and assets: 10GB
Total storage requirement: ~11GB
Redis Operations:
Estimated 500 operations per user per hour
Total Redis operations per hour: 500,000
Pub/Sub Messages:
Estimated 200 messages per project per hour
Total Pub/Sub messages per hour: 20,000
The App is written in Rust(Don't ask why) and is meant for a UI based editor and the goal is to support collaborative editing through this App.
Got 2 side projects on Azure container apps, cold starts are ~20s, you pay while container is up not serving requests + the 5 mins it takes idling to go down. With cloud run I'm getting ~1s cold starts (one .NET and one Sveltekit), it's the same price if they're running 24/7, but since I only pay for request processing time it's much much cheaper.
I honestly don't understand how this is not compared to Azure/AWS often, it's a huge advantage imo. aws AppRunner doesn't scale to 0, paying is for uptime not request processing so much more expensive just like Azure. I'm in the process of moving everything to gcloud over hust this thing (everything else is similar, postgres, vms, buckets, painless S3 interoperability is a plus compared to azure storage accounts)
Is there a catch I'm not seeing?
I understand that Cloud Run is considered "serverless", i.e the server infrastructure is abstracted from the developer. At the same time, I have the option to create Compute Engine instances where the OS is stripped down to only serve as a container OS, and the infrastructural dependencies are part of the deployed Docker container.
Both also seem to support autoscaling, specifically through Kubernetes with Compute Engine and Knative (which is native-Kubernetes?) with cloud run. When deploying containers, what are the pros and cons of using one of these services over the other?
Here's how I use it:
- Cloud Run is my default / go to for any kind of web app. Containers really only "run" when they have an active HTTP request going on. So if it's not a webapp, don't use it. If you want to run background tasks don't use it (there are some ways to do background tasks, but it's currently a bit of a hack). As one of the other comments noted, you get a Load Balancer for free - so that's a good reason to use it over K8s.
- Container OS on compute engine - I use this when I want some traditional VM infrastructure, but want to have the configuration as Infrastructure as Code. With container OS, I can have all the software configuration nicely packaged. It also means I have flexibility to run elsewhere (e.g. K8s). If you have K8s running, in most cases I'd just deploy there. However, I try and avoid running K8s unless needed. I'd also consider using the Container OS approach for things that want persistence with a bit less magic / complexity than it takes on K8s. Autoscaling with compute engine is of course possible - but it's probably simpler to setup with K8s. Examples of things I've run with Container OS is a squid proxy and a continually running Java app that does web scraping.
Note that App Engine is also considered serverless. The Standard flavor scales down to zero (= free).
Here's a comparison to Compute Engine: https://cloud.google.com/appengine/docs/the-appengine-environments#comparing_the_flexible_environment_to_compute_engine
I am running a Python API and an Angular Frontend.
Pricing/Autoscaling: The pricing model between GAE Flexible Environment and Cloud Run are a bit different.
- In GAE Flexible, you are always running at least 1 instance at any time. So even if your app is not getting any requests, you’re paying for that instance. Billing granularity is 1 minute.
- In Cloud Run, you are only paying when you are processing requests, and the billing granularity is 0.1 second. See here for an explanation of the Cloud Run billing model.
Underlying infrastructure: Since GAE Flexible is running on VMs, it is a bit slower than Cloud Run to deploy a new revision of your app, and scale up. Cloud Run deployments are faster.
Portability: Cloud Run uses the open source Knative API and its container contract. This gives you flexibility and freedom to a greater extent. If you wanted to run the same workload on an infra you manage (such as GKE), you could do it with "Cloud Run on GKE".
I'd actually suggest that you seriously consider Cloud Run over App Engine.
Over time, I've seen a few comments of a "new" App Engine in the works, and it really seems that Cloud Run is that answer. It is in beta, and that can be an issue. I've seen some companies use beta services in production and others wait. However, if I am going to start a new app today - it's going to be Cloud Run over App Engine Flex for sure.
Google is very deep into Kubernetes as a business function. As Cloud Run is sitting on GKE - this means that it is indirectly receiving development via other teams (The general GKE infrastructure).
Conversely, App Engine is on some older tech. Although it's not bad - it is "yesterday's" technology. Google, to me, seems to be a company that gets really excited about what is new and what is being highly adopted in the industry.
All this said - when you wrap your services in a container, you should be able to run them anywhere? Well, anywhere there is a container platform. You can front your services with something like Cloud Endpoints and you can deploy on both App Engine and Cloud Run - swap back and forth. Then, at that point, the limitations might be the services that are offered. For instance, Cloud Run currently doesn't support some items, like Cloud Load Balancing or Cloud Memorystore. That might be a blocker today.