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

Explain stateless versus stateful function design in a serverless architecture. When should a function be fully stateless, and when is holding state (session context, aggregated results, a warm cache) actually justified? Where does that state live once it's outside the function, and what latency or consistency trade-offs come with each option?

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.

EasyTechnical
60 practiced

A serverless function has intermittent cold-start latency spikes that are hurting your p99. Name three practical strategies to reduce cold-start latency, and for each one explain the mechanism by which it helps and its trade-offs in cost, complexity, or effectiveness.

EasyTechnical
66 practiced

Walk through what actually determines your bill for a workload running on a serverless platform, then use it: given a request rate, average execution duration, and memory size, estimate the monthly cost. Which levers would you tune first to bring the cost down without hurting your latency SLOs?

HardSystem Design
47 practiced

Design a serverless architecture for a latency-sensitive API with a p99 SLO around 50ms, steady traffic of about 100 requests/sec with bursts to 1000 rps for short periods. Describe the components (gateway, functions, caches, CDN), how you'd meet the latency and concurrency requirements (provisioned concurrency, local caches, warm pools), and the cost-versus-latency trade-offs of each choice. If cost pressure rules out running everything at full provisioned capacity, how would you degrade gracefully under a burst rather than blowing the SLO?

Unlock Full Question Bank

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