Scan with Phone

Scan to instantly open and share this page on your mobile device.

Link copied to clipboard!

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.

Event-First Design: Use Cloud Functions for single-purpose event handling; Workflows for multi-step orchestration; Eventarc for event routing; Scheduler for time-based triggers. Avoid long-running processes.

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

DimensionCloud FunctionsWorkflowsEventarcCloud Scheduler
Primary PurposeStateless function executionService orchestrationEvent routingScheduled execution
Execution ModelSingle function per triggerMulti-step workflowsEvent filtering/routingTime-based triggers
Duration Limits9 minutes (1st gen), 60 min (2nd gen)Up to 1 yearEvent delivery onlyTrigger duration varies
Language SupportNode.js, Python, Go, Java, .NET, Ruby, PHPYAML-based DSLLanguage agnosticHTTP/Pub/Sub targets
Cost ModelInvocations + compute timeWorkflow steps + durationEvent deliveryJob executions
State ManagementStatelessWorkflow state maintainedStateless routingStateless scheduling

Mathematical Selection Model

Criteria [0..10]. Higher scores indicate better service fit.

Score_CloudFunctions = 0.35*C_simpleFunctions + 0.25*C_eventDriven + 0.20*C_devSpeed + 0.10*C_costSensitivity + 0.10*(10 - C_multiStep) Score_Workflows = 0.35*C_multiStep + 0.25*C_serviceIntegration + 0.20*C_errorHandling + 0.15*C_orchestration + 0.05*(10 - C_simpleFunctions) Score_Eventarc = 0.40*C_eventDriven + 0.25*C_serviceIntegration + 0.20*C_decoupling + 0.10*C_routing + 0.05*(10 - C_scheduleBased) Score_CloudScheduler = 0.40*C_scheduleBased + 0.25*C_cronJobs + 0.20*C_reliability + 0.10*C_simplicity + 0.05*(10 - C_eventDriven)
{{s.name}}: {{s.val | number:2}}

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.

next