Bird
0
0

Which of the following is the correct way to specify a timeout in a microservice HTTP client call in pseudocode?

easy📝 Conceptual Q3 of 15
Microservices - Resilience Patterns
Which of the following is the correct way to specify a timeout in a microservice HTTP client call in pseudocode?
AhttpClient.call(url, retry=5)
BhttpClient.call(url, encrypt=true)
ChttpClient.call(url, cache=true)
DhttpClient.call(url, timeout=5000)
Step-by-Step Solution
Solution:
  1. Step 1: Identify timeout parameter usage

    Timeout is usually set as a time limit parameter in milliseconds or seconds.
  2. Step 2: Analyze options

    Only httpClient.call(url, timeout=5000) sets a timeout parameter; others set retry, cache, or encryption which are unrelated.
  3. Final Answer:

    httpClient.call(url, timeout=5000) -> Option D
  4. Quick Check:

    Timeout syntax = timeout parameter [OK]
Quick Trick: Timeout is a time limit parameter in calls [OK]
Common Mistakes:
MISTAKES
  • Using retry instead of timeout
  • Confusing cache or encrypt with timeout
  • Omitting timeout parameter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes