Group 3: Serverless & Functions
Event-driven compute and orchestration: Cloud Functions (FaaS), Workflows (service orchestration), Eventarc (event routing), Cloud Scheduler (cron jobs). Focus on stateless execution, automatic scaling, and pay-per-use pricing models.
Services & Core Identity
Cloud Functions
Event-driven serverless functions with automatic scaling, multiple triggers, and language runtime support.
Workflows
Serverless orchestration for connecting Google Cloud services with conditional logic and error handling.
Eventarc
Event-driven architecture enabling loose coupling between services with CloudEvents standard support.
Cloud Scheduler
Fully managed cron service for triggering jobs on schedules with HTTP, Pub/Sub, and App Engine targets.
Key Differences
| Dimension | Cloud Functions | Workflows | Eventarc | Cloud Scheduler |
|---|---|---|---|---|
| Primary Purpose | Stateless function execution | Service orchestration | Event routing | Scheduled execution |
| Execution Model | Single function per trigger | Multi-step workflows | Event filtering/routing | Time-based triggers |
| Duration Limits | 9 minutes (1st gen), 60 min (2nd gen) | Up to 1 year | Event delivery only | Trigger duration varies |
| Language Support | Node.js, Python, Go, Java, .NET, Ruby, PHP | YAML-based DSL | Language agnostic | HTTP/Pub/Sub targets |
| Cost Model | Invocations + compute time | Workflow steps + duration | Event delivery | Job executions |
| State Management | Stateless | Workflow state maintained | Stateless routing | Stateless scheduling |
Mathematical Selection Model
Criteria [0..10]. Higher scores indicate better service fit.
Interpretation Rules
- Cloud Functions: Data processing, API backends, webhook handling, image/file processing
- Workflows: ETL pipelines, approval processes, microservice orchestration, batch job coordination
- Eventarc: Event-driven architectures, service decoupling, audit trails, event filtering
- Cloud Scheduler: Periodic data sync, report generation, cleanup jobs, health checks
When NOT to Use Serverless
- Long-running processes requiring persistent state (consider Compute Engine, GKE)
- Real-time applications with strict latency requirements (cold start delays)
- Applications requiring specific OS/kernel configurations
- High-throughput streaming with sustained load (consider dedicated infrastructure)
Summary
GCP serverless services enable event-driven architectures with automatic scaling and pay-per-use pricing. Cloud Functions handles discrete events, Workflows orchestrates complex processes, Eventarc routes events between services, and Cloud Scheduler provides reliable time-based triggers. Choose based on execution patterns, complexity, and integration requirements.