At Google Cloud Next 2019 in San Francisco today, Google announced Cloud Run, the newest member of its serverless compute stack, in beta. The company also unveiled new investments in its Cloud Functions and App Engine platforms.

Developers often have to choose between the ease and velocity of serverless or the flexibility and portability of containers. Google says it wants to offer the best of both worlds. Its new serverless compute platform is supposed to let developers build end-to-end applications their own way, without worrying about the underlying infrastructure.

Cloud Run

Cloud Run lets developers run stateless HTTP-driven containers on a fully managed serverless execution environment. It takes care of all infrastructure management, including provisioning, configuring, scaling, and managing servers. Cloud Run automatically scales up or down “within seconds” — even down to zero, so you pay only for the resources you actually use. For those curiuos about the limitations, Cloud Run is using the Gvisor sandbox, but as long as your workloads are stateless HTTP containers you should be fine.

“What we’re doing with Cloud Run is introducing a brand new product that takes Docker containers, and instantly gives you a URL,” Oren Teich, director of serverless at Google Cloud, explained. “This is completely unique in the industry — we’re taking care of everything from the top end of SSL provisioning, routing, all the way down to actually running the container for you. You pay only by the hundred milliseconds of what you use. And it’s end-to-end managed.”

“As the developer, you just give us the container; everything else is taken care of,” Teich continued. “So you use the command line or through the UI, give us the container. We deploy it, set up HTTPS, an endpoint, the load balancing, the routing, the scaling. There are two parameters to tweak in terms of memory. And everything is handled for you automatically there. So this isn’t a complicated orchestration system. This is a very easy-to-use, developer-friendly product. And yeah, it scales from zero. So you literally only pay when a request comes in.”

GKE and Knative

Cloud Run on Google Kubernetes Engine (GKE) lets developers run serverless workloads on their existing GKE clusters. You can deploy the same stateless HTTP services to your own GKE cluster and simultaneously abstract away complex Kubernetes concepts. Cloud Run on GKE also gives you access to custom machine types, Compute Engine networks, and the ability to run side-by-side with other workloads deployed in the same cluster.

Cloud Run is based on Knative, an open API and runtime environment that lets developers run serverless workloads anywhere. Knative lets you start with Cloud Run and move to Cloud Run on GKE later. Or, you can use Knative in your own Kubernetes cluster and migrate to Cloud Run in the future. Using Knative as the underlying platform lets you move your workloads across platforms, which should reduce switching costs. Since it launched eight months ago, Knative already has over 50 contributing companies and 400 contributors, and more than 3,000 pull requests.

New Google Cloud Functions features

Google Cloud Functions is an event-driven serverless compute platform that lets you write code that responds to events, also without worrying about the underlying infrastructure. Google today is adding a few frequently requested features:

  • New language runtimes support such as Node.js 8, Python 3.7, Go 1.11 in general availability, Node.js 10 in beta, Java 8 and Go 1.12 in alpha.
  • The new open-source Functions Framework, available for Node.js 10, will help you take the first step towards making your functions portable. You can now write a function, run it locally, and build a container image to run it in any container-based environment.
  • Serverless VPC Access, now available in beta, creates a VPC connector that lets your function talk to your existing GCP resources that are protected by network boundaries, without exposing the resources to the internet. This feature allows your function to use Cloud Memorystore as well as hundreds of third-party services deployed from the GCP Marketplace.
  • Per-function identity provides security access at the most granular function level and is now generally available.
  • Scaling controls, now available in beta, help prevent your auto-scaling functions from overwhelming backends that do not scale up as quickly in a serverless fashion.

New second generation runtimes in App Engine

While functions provide agility and simplicity, sometimes you want to deploy large applications, while still leveraging the benefits of serverless. In May 2008, Google launched App Engine, a serverless application platform for deploying highly scalable web and mobile apps.

The company has been adding capabilities and support for new runtimes ever since. Today at Google Cloud Next 2019 is no different.

Google announced support for new second-generation runtimes: Node.js 10, Go 1.11, and PHP 7.2 in general availability, plus Ruby 2.5 and Java 11 in alpha. Google promises these runtimes provide an idiomatic developer experience and faster deployments, remove previous API restrictions, and come with support for native modules. And as you’d expect, Serverless VPC access also lets you connect to your existing GCP resources from your App Engine apps without exposing them to the internet.

Google’s pitch to developers building applications with serverless is simple. It’s not just about building faster or lowering the operational overhead of managing infrastructure. There’s also a full stack of additional services at your fingertips.