What is your approach to performance testing serverless functions?
- serverless
- cold start
- lambda
- scaling
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Unique challenges: cold starts, concurrency limits, timeout constraints. Tests: (1) Cold start latency: invoke after idle period, measure initialization time. (2) Warm invocation performance: rapid successive calls. (3) Concurrency scaling: send N concurrent requests, verify auto-scaling works and response times are acceptable. (4) Memory and timeout limits: test with varying payload sizes. (5) Cost modeling: estimate cost per request under expected load. (6) Compare cold vs warm performance across memory allocations. Tools: k6, Artillery, AWS Lambda Power Tuning.
What interviewers listen for
- Workload modellingYou design the load shape from product traffic, not from tool defaults.
- Percentile literacyYou read p50/p95/p99 separately and explain why each matters.
- Bottleneck triageYou correlate metrics across application, database, and infrastructure layers.
- Capacity instinctsYou can translate a soak test into a sizing or scaling recommendation.