
Cloud Run
Cloud Run is a service from Google that runs programs without requiring you to set up your own server. The service automatically starts the program when a request comes in and shuts it down again when there is nothing to do.
Anyone offering a website or an app on the internet needs a computer that is constantly reachable. In the past, you had to rent a machine yourself, set up an operating system, and maintain it. Cloud Run is an offering from the company Google that takes over this part. You upload your finished program, and Google makes sure it runs. When a request comes in from the internet, Cloud Run starts the program and sends the response back. When there is no request at the moment, nothing runs – and it costs nothing either.
Why developers save time and money with it
The biggest advantage is billing based on actual usage. A rented server costs money regardless of whether anyone uses it. With Cloud Run, you only pay for the seconds during which the program is actually computing. For small projects or services with irregular demand, this is often many times cheaper.
The second advantage is scaling. This means that a service grows along with the number of its users. If a thousand people suddenly send a request at the same time, Cloud Run automatically starts many copies of the program side by side. When demand drops, the copies disappear again. A team doesn’t have to do anything or predict anything for this to happen.
This is particularly useful for AI applications. Many chatbots and image generators consist of a small program that receives requests and forwards them to a large language model. This intermediate piece often runs on Cloud Run or a comparable service. This way, a startup can put a prototype online in an afternoon.
Containers, cold starts, and the path of a request
Cloud Run expects the program in the form of what is called a container. A container is a self-contained package that includes the program code and everything it needs to run. You can think of it like a moving box: it gets unpacked somewhere else and works there exactly as it did at home. This is why Cloud Run doesn’t care which programming language the program was written in.
When a request arrives, Cloud Run looks for a copy of the container that is already running. If there isn’t one, a new one is started. Depending on the program, this startup takes anywhere from a few hundred milliseconds to a few seconds. Experts call this a cold start, and it is the best-known drawback of this approach. Anyone wanting to avoid it can book a minimum number of permanently running copies for an extra fee.
A common misconception is that Cloud Run stores data. It doesn’t. Each copy is ephemeral and loses everything it remembered when it shuts down. Databases and files are therefore always kept in separate services. This separation is not a shortcoming but the very condition that allows copies to be created and removed at will.
From the school app to corporate IT
In everyday life, you never encounter Cloud Run directly, only through the services that run on it. The contact form of an online shop, the interface of a mobile app, or a small translation service can all be operated there. To users, it looks like any other internet address.
In the news, the name usually comes up in connection with the competition among the major cloud providers. Amazon offers similar services with AWS Lambda and Fargate, Microsoft with Azure Container Apps. All of them follow the principle known as serverless: servers still exist, but the customer no longer sees or manages them.
The barrier to entry is also low for students and hobby programmers. Google grants a monthly free quota, within which small projects cost nothing. Nevertheless, a cost limit is important, because a faulty program can make itself expensive through automatic scaling.