Bird
0
0

Consider this simplified serverless function behavior:

medium📝 service behavior Q13 of 15
GCP - Cloud Functions
Consider this simplified serverless function behavior:
1. Function is idle for 30 minutes.
2. A request arrives.
3. Function starts fresh (cold start).
4. Subsequent requests arrive quickly.
What happens to the response time for the first and second requests?
AFirst request slow, second request fast
BBoth requests slow
CBoth requests fast
DFirst request fast, second request slow
Step-by-Step Solution
Solution:
  1. Step 1: Understand cold start impact on first request

    The first request after idle triggers a cold start, causing delay and slower response.
  2. Step 2: Understand warm start for subsequent requests

    After the function is running, subsequent requests use the warm instance, so response is fast.
  3. Final Answer:

    First request slow, second request fast -> Option A
  4. Quick Check:

    Cold start delays first request only [OK]
Quick Trick: First request cold, next requests warm and fast [OK]
Common Mistakes:
  • Assuming all requests are slow
  • Thinking cold start affects every request
  • Confusing cold start with scaling delays

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes