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.

MediumTechnical
61 practiced

You're leading a cross-functional evaluation to choose between serverless functions and containerized microservices for a new component, for example a CPU-bound batch or ingestion workload. Build an evaluation framework: what criteria would you weight (cost, latency, cold starts, scalability, operational complexity), how would you weight them, and what's your plan for a short pilot or spike to gather real evidence before committing?

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

Write pseudo-code for a serverless function that consumes from a message queue and batches incoming items into groups of up to 16, or after a 50ms wait, whichever comes first, before processing the batch. How is this safe when multiple instances of the function are running concurrently, and what assumptions are you making about the queue's semantics (visibility timeout, deletion)?

MediumSystem Design
37 practiced

A long-running job (say, a Kubernetes job, or a managed batch or training service) needs to be triggered, tracked, and retried from your serverless layer. How do you pass parameters in, track progress, handle retries and idempotency if it fires twice, and notify on completion? Where does the workflow's own state actually live?

MediumTechnical
42 practiced

Serverless functions triggered by an at-least-once delivery system (like SQS or Pub/Sub) can receive the same event more than once. What patterns would you use to make a handler idempotent in that situation, and what are the performance and storage trade-offs between them?

Unlock Full Question Bank

Get access to all 12 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.