When comparing Google Cloud Functions vs Cloud Run, the Slant community recommends Google Cloud Functions for most people. In the question“What are the best serverless frameworks?” Google Cloud Functions is ranked 3rd while Cloud Run is ranked 11th. The most important reason people chose Google Cloud Functions is:
Ranked in these QuestionsQuestion Ranking
Pro Supports multiple languages
Pro Supports multiple sources of events
Cloud Functions can be triggered from PubSub and from HTTP events, for example.
Pro Frictionless to create
There is an inline editor in Google Cloud for writing and submitting/deploying cloud functions, so while it is possible to store a Cloud function as code in a repository you can try and experiment without getting to that point.
The system supports arbitrary code and dependencies, since it is based in containers rather than a particular programming language. This makes it far more flexible than most of the other options which require a specific language.
The code doesn't need to make any Google-specific assumptions and can be easily deployed in other kinds of environments and frameworks.
Cloud Run includes Identity & Access Management (IAM) integration, so that it is possible to limit access to specific microservices rather than granting wide access.
Pro Cost effective
Google's pricing for Cloud Run involves only charging when the service is in use, with the ability for the service to scale-down-to-zero, making it economical to use Cloud Run with microservices and websites that receive relatively low or spiky traffic.
Con Limited languages and dependencies
Only the set of languages explicitly supported by Cloud Functions can be used; for more flexibility, I would highly recommend Google's other serverless environment, namely Cloud Run.