Cloud Functions

Event-driven functions (now Cloud Run functions).

Problem it solves: Spiky or infrequent workloads waste always-on capacity.

Where it sits: Triggered by HTTP, queues or storage events.

When to use

  • Spiky, short tasks; glue code.

When not to use

  • Latency-critical paths sensitive to cold starts; long-running jobs.

Failure modes

  • Cold starts add latency.
  • Concurrency limits throttle bursts.

Metrics to watch

  • Invocations/s
  • Cold-start rate
  • Throttles

Alternatives

  • Stateless worker on a queue

Configuration in Labs (illustrative defaults)

  • Instances (count) = 20 — Identical copies behind this logical component. Capacity scales linearly in this model.
  • Capacity per instance (req/s) = 100 — Maximum requests one instance completes per second before it saturates.
  • Base service time (ms) = 40 — Processing time per request at zero load. Queueing adds to this as utilisation rises.

Vendor examples (pattern only): Google Cloud managed service. Simulated as a generic “Serverless function”.

In the guide