Bird
0
0

Given a microservices system where Service A calls Service B 5 times and Service B calls Service C 3 times per user request, what is the total number of service calls triggered by one user request?

medium📝 Analysis Q13 of 15
Microservices - Advanced Patterns
Given a microservices system where Service A calls Service B 5 times and Service B calls Service C 3 times per user request, what is the total number of service calls triggered by one user request?
A20
B15
C30
D8
Step-by-Step Solution
Solution:
  1. Step 1: Calculate calls from Service A to B

    Service A calls Service B 5 times per request.
  2. Step 2: Calculate calls from Service B to C triggered by A's calls

    Each of the 5 calls from A causes 3 calls from B to C, so 5 * 3 = 15 calls.
  3. Step 3: Sum all calls

    Total calls = 5 (A->B) + 15 (B->C) = 20 calls.
  4. Final Answer:

    20 -> Option A
  5. Quick Check:

    5 + (5*3) = 20 [OK]
Quick Trick: Multiply nested calls, then add all [OK]
Common Mistakes:
  • Adding 5 + 3 instead of multiplying
  • Ignoring nested calls from B to C
  • Choosing sum as 18 instead of 20

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes