Exams / DVA-C02 / Concurrency and performance tuning / Question 1
DVA-C02 practice question: Concurrency and performance tuning (1 of 3)
Troubleshooting and Optimization A free question from our original DVA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.
A Lambda function behind Amazon API Gateway loads a large framework during initialisation. Every weekday at 09:00 traffic jumps sharply, and users see slow responses for the first requests because of cold starts. The team wants these requests to respond with consistently low latency. What should the developer configure?
Choose one answer.
- AA. Reserved concurrency on the function equal to the expected peak.
- BB. Provisioned concurrency on an alias, scheduled to scale up before 09:00.
- CC. A longer function timeout so that slow first requests do not fail.
- DD. An SQS queue between API Gateway and the function to absorb the burst.
Show the answer and explanation
Answer: B
- A. Wrong: Reserved concurrency guarantees and caps concurrency, but environments are still initialised on demand, so cold starts remain.
- B. Right: Correct. Provisioned concurrency keeps environments initialised and ready, and scheduled scaling covers a predictable peak.
- C. Wrong: This stops timeouts but does nothing about the latency of cold starts.
- D. Wrong: Queuing makes the API asynchronous and adds delay. It does not remove initialisation time.
Explanation
Provisioned concurrency pre-initialises a set number of execution environments for a version or alias, so requests skip the cold start. It can be scaled on a schedule with Application Auto Scaling for predictable peaks. Reserved concurrency only guarantees and limits capacity.
Study
Keep practising
Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.