Embracing serverless architectures help you bring solutions to market faster at lower cost with decreased management overhead than traditional approaches. Cloud Functions and Cloud Run are two such serverless compute products from Google Cloud, and customers often ask us “when does it make more sense to use Cloud Functions or Cloud Run?”
From our partners:
Choosing a serverless product
Both Cloud Functions and Cloud Run can scale from zero to meet incredibly high demand. But there are trade-offs between the two in terms of simplicity and flexibility.
If you’re using a serverless product to connect your platform, you likely don’t need to configure a container to control the web server or language runtime. In this case, Cloud Functions manages this configuration on your behalf, letting you focus on what’s core to your business. Running services, on the other hand, requires more control of the container including choosing the web server or language runtime. For this use case, Cloud Run provides the flexibility needed for these configurations while managing the rest on your behalf.
Connecting your platform with Cloud Functions
We leverage Cloud Functions to process short-lived, event-based actions triggered from other systems such as Cloud Storage, Eventarc, or PubSub, e.g., for data pipeline automation.
- Transforming data and loading it into BigQuery
- Creating a webhook that’s called by a third party (i.e., GitHub)
- Use ML APIs to analyze data added to a database or storage bucket
Running services with Cloud Run
Cloud Run comes into play when further customization is required, e.g., when embedding AI models or serving multiple interfaces for a longer period of time is required.
Commerzbank AG
- Any web-based workload
- REST or gRPC APIs for mobile apps or games
- Internal custom backoffice apps
Using Cloud Functions and Cloud Run together
Cloud Functions and Cloud Run can be complimentary in a multi-workload landscape.
Combining both services boosts our productivity considerably since application teams can focus on business code instead of infrastructure and its dependencies, which is conveniently covered by Google Cloud.
Commerzbank AG
By: Jaisen Mathai (Group Product Manager, Google Cloud) and Sara Ford (Senior Developer Relations Engineer)
Source: Google Cloud Blog
For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!
Our humans need coffee too! Your support is highly appreciated, thank you!