Cloud Run: The Future of PaaS
Apr 21, 2019
One of the major announcements at Google Cloud Next this year was Cloud Run, which Google describes as “containers meet serverless.” Although that’s a great combination of two current buzzwords, in terms of functionality it may be more accurate to think of Cloud Run as a modern PaaS service. In contrast to classic PaaS, popularized by platforms like Heroku, Cloud Run offers the following advantages:
- Accepts Docker containers rather than code, though it does offer a separate, optional cloud build system.
- Automatically scales based on traffic to maintain a user-definable number of concurrent connections per instance, which defaults to 80.
- Only charges for CPU and Memory consumed during an actual web request (rounded up to the nearest 0.1 seconds).
However, it’s still in beta and has a few drawbacks including being only available in a single region, at the moment, and no ability to set a maximum budget or scale-out limit. You also can’t connect a Cloud Run service to a VPC, which makes it harder to secure connections between Cloud Run and some backends.
The most notable benefit is that it’s built on containers, which makes the applications you deploy on Cloud Run very portable. If it turns out your container is serving queries most of the time, it would be easy to move the service to Kubernetes, Google Compute Engine, AWS Fargate, Azure, or even DigitalOcean. It’s also easy to test applications, and most developers are familiar with containers.
The focus on containers also means it is possible to deploy just about anything using just about any development environment. One example I found particularly amusing is Fortran 90 on Cloud Run. A community has already started to form around this technology with a very useful unofficial Community FAQ as well as an awesome list.
Enterprise users may continue to find that orchestrating pods on Google Kubernetes Engine is the best way to manage large containerized applications, other containerized applications might be more easily deployed using Cloud Run along with Google’s existing managed container platform which includes Google Compute Engine’s create-with-container, or Container-Optimized OS as well as App Engine Flexible. These services allow you to use the familiar and well tested tools built-in with Google Cloud Platform for your containerized applications, though in the end you give up some portability for convenience.
If I have any qualms over Cloud Run it is with Google itself whose focus is often inscrutable. App Engine is a perfect example of a service which has suffered through a mixed stewardship from Google. It was a breakthrough service which may have been ahead of its time, but it languished for years without significant updates as other platforms caught up and exceeded its capabilities. App Engine Flexible appeared bring new life to the platform until the second generation runtimes came out and seemed to signal a step away from a containerized focus. Cloud Run might be thought of as App Engine Flexible second generation in this context, but will Google continue to invest in this new service, and adapt it to emerging workflows? I have no idea.
If this has peaked your interest, I encourage you to give Cloud Run a try. The more users it has, the more likely it is to remain in Google’s good graces.