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

What are your options for packaging a runtime and its dependencies into a serverless function: a plain zip deployment, layers, or a container image? For a large dependency, when would you prefer a container image over the other two, and how does image size affect cold-start time?

MediumTechnical
45 practiced

What practical strategies would you use to reduce vendor lock-in when designing a serverless deployment? Consider your options around portable packaging, workflow-orchestration choice, infrastructure-as-code portability, and abstraction layers between your code and the platform, and weigh those against the added operational complexity, latency, or delayed feature access that comes with staying portable.

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)?

EasyTechnical
38 practiced

A greenfield service needs to choose between serverless functions and containers managed by Kubernetes. What practical criteria would you use to decide: think about latency and cold starts, traffic pattern, cost model, operational overhead, vendor lock-in, and your team's existing skills. In what kind of scenario does one option clearly win?

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.

Unlock Full Question Bank

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