Need advice about which tool to choose?Ask the StackShare community!

Google Cloud Functions

472
472
+ 1
25
Google Cloud Run

262
229
+ 1
62
Add tool

Google Cloud Functions vs Google Cloud Run: What are the differences?

Introduction: This Markdown code provides a comparison between Google Cloud Functions and Google Cloud Run, highlighting key differences between the two services.

  1. Serverless vs. Containerization: Google Cloud Functions is a serverless computing service, which means developers only need to write and deploy code without worrying about managing infrastructure. On the other hand, Google Cloud Run allows developers to deploy containerized applications, giving more control over the runtime environment and the ability to package applications with their dependencies.

  2. Request-Driven vs. Event-Driven: Google Cloud Functions is primarily designed for event-driven scenarios. It reacts to events, triggered by various Google Cloud services, by executing the associated code. In contrast, Google Cloud Run is request-driven. It responds to incoming HTTP requests and executes the corresponding containerized application.

  3. Scaling Model: Google Cloud Functions automatically scales to handle incoming events and can scale to zero when there is no traffic. It allows developers to focus solely on the code logic without worrying about managing infrastructure scaling. Google Cloud Run also auto-scales based on incoming HTTP requests, but it requires the developer to provision and manage the underlying infrastructure for the containerized application.

  4. Billing Structure: Google Cloud Functions is billed on the number of function invocations, execution time, and memory usage. It offers a free tier for a certain level of usage. On the other hand, Google Cloud Run is billed based on the number of requests and the amount of CPU and memory resources used by the container instances. It does not have a free tier and requires the developer to pay for the resources used.

  5. Execution Environment: Google Cloud Functions supports several programming languages, such as Node.js, Python, and Go. It provides a convenient development and deployment experience, abstracting away the underlying infrastructure. Google Cloud Run, on the other hand, supports any language or runtime that can be packaged into a container.

  6. Flexibility and Portability: Google Cloud Functions is tightly integrated with the Google Cloud ecosystem, making it easy to trigger functions based on various events from Google Cloud services. Google Cloud Run, being based on containerization technology, offers more flexibility and allows developers to deploy applications that are not tightly coupled with the Google Cloud ecosystem. It offers portability to other cloud platforms that support containerization, such as Kubernetes.

In Summary, Google Cloud Functions is a serverless computing service optimized for event-driven scenarios with automatic scaling, while Google Cloud Run allows developers to deploy containerized applications with more control over the runtime environment and flexibility across different cloud platforms.

Decisions about Google Cloud Functions and Google Cloud Run
Clifford Crerar
Software Engineer at Bidvest Advisory Services · | 9 upvotes · 66.4K views

Run cloud service containers instead of cloud-native services

  • Running containers means that your microservices are not "cooked" into a cloud provider's architecture.
  • Moving from one cloud to the next means that you simply spin up new instances of your containers in the new cloud using that cloud's container service.
  • Start redirecting your traffic to the new resources.
  • Turn off the containers in the cloud you migrated from.
See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Google Cloud Functions
Pros of Google Cloud Run
  • 7
    Serverless Applications
  • 5
    Its not AWS
  • 4
    Simplicity
  • 3
    Free Tiers and Trainging
  • 2
    Simple config with GitLab CI/CD
  • 1
    Built-in Webhook trigger
  • 1
    Typescript Support
  • 1
    Blaze, pay as you go
  • 1
    Customer Support
  • 11
    HTTPS endpoints
  • 10
    Fully managed
  • 10
    Pay per use
  • 7
    Concurrency: multiple requests sent to each container
  • 7
    Deploy containers
  • 7
    Serverless
  • 6
    Custom domains with auto SSL
  • 4
    "Invoke IAM permission" to manage authentication
  • 0
    Cons

Sign up to add or upvote prosMake informed product decisions

Cons of Google Cloud Functions
Cons of Google Cloud Run
  • 1
    Node.js only
  • 0
    Typescript Support
  • 0
    Blaze, pay as you go
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions