Serverless and Function-as-a-Service Architecture Questions

Building applications on managed, event-triggered compute: functions-as-a-service (AWS Lambda, Azure Functions, Google Cloud Functions, Cloudflare Workers) and serverless containers. Covers the invocation lifecycle and cold starts (init vs handler work, provisioned concurrency, packaging, layers and container images), statelessness and externalizing state, execution limits (timeouts, memory, payload and /tmp size), concurrency and scaling behavior (account limits, burst scaling, protecting downstream databases with connection proxies and throttling), event sources and trigger semantics (at-least-once delivery, retries, idempotent handlers, dead-letter handling), composing functions with managed services and workflow orchestrators (Step Functions and equivalents), and serverless-specific observability, security (per-function IAM, secrets) and pay-per-invocation cost modeling. Includes when serverless fits versus containers or VMs, and vendor lock-in trade-offs. General compute selection, generic messaging patterns, and general idempotency theory are covered by their own topics.

EasyTechnical
34 practiced

What would you monitor for a serverless service in production? Cover infrastructure-level signals (invocations, duration, errors), a function-level breakdown (time spent in initialization versus in the handler), and any service-specific output you'd want visibility into. For each category, explain why it matters.

HardSystem Design
34 practiced

Design an observability architecture for a serverless platform: end-to-end distributed tracing from the API gateway through the function to whatever it calls downstream, plus service-level metrics and anomaly detection, all while keeping the observability bill under control. What sampling strategy would you use, where do traces and metrics get stored, and how do you correlate telemetry across an async hop to debug one specific failed request?

MediumTechnical
42 practiced

Write language-agnostic pseudo-code for a wrapper that measures and emits two metrics per invocation: time spent in initialization (cold-start setup), and time spent in the handler itself. How does your wrapper tell a cold invocation apart from a warm one, and how would it push these metrics to a monitoring backend?

MediumTechnical
41 practiced

A function is hitting downstream throttling from a database or third-party API during traffic spikes. Design a strategy to handle this gracefully: consider buffering with queues, circuit breakers, retry behavior, rate-limiting at the edge, and what a degraded-mode response looks like when a dependency is unavailable. How would you implement this on a serverless platform specifically?

HardSystem Design
50 practiced

Architect an autoscaling strategy for a serverless service that handles highly spiky traffic, such as ticket sales, with bursts up to 50x baseline for short periods. You need to minimize cold-start latency, control cost, and maintain resilience. Describe your warm-up strategy, your approach to predictive scaling, queue-based throttling, and how you'd evaluate SLA risk.

That is every published Serverless and Function-as-a-Service Architecture question for Site Reliability Engineer (SRE) so far. Browse the other topics in this category, or practice this one interactively.