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.

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
50 practiced

A Lambda-based function is CPU-bound and spends 60% of its cold-start time loading a large dependency into memory. Propose concrete optimizations (code changes, packaging, memory/CPU sizing, provisioned concurrency) to reduce cold-start overhead and improve throughput. For each optimization, state how you'd measure success and any side effects.

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?

EasySystem Design
68 practiced

What event-driven design patterns are commonly used in serverless architectures? Walk through a concrete example: a pipeline that needs to kick off a downstream job whenever a new file lands in object storage. What components and events would you wire together, and how would you make sure the trigger is reliable and doesn't fire the job twice for the same file?

MediumTechnical
42 practiced

A deployment artifact you need to run in Lambda is 800MB, well past the deployment-package limit and too big to comfortably fit in /tmp. Compare architectures for serving it: mounting EFS, streaming it from S3 at cold start, packaging it as a container image, or moving it to a managed endpoint outside Lambda entirely. For each, discuss cold-start latency, throughput, cost, and operational complexity.

Unlock Full Question Bank

Get access to all 24 Serverless and Function-as-a-Service Architecture interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.