CS FundamentalsVery hardProduct-company placement · SRE interview
A request flows client → A → B → C → D. Services A, B and C each make up to 3 attempts (1 + 2 retries) when their downstream call fails. D is completely down. How many calls reach D for one client request?
- A. 27
- B. 9
- C. 81
- D. 3
Correct answer: A. 27
C tries D 3 times per call from B, B calls C 3 times per call from A, and A calls B 3 times: 3³ = 27. Adding retries per layer (3 + 3 + 3 = 9) misses that they multiply; this retry amplification is why retries belong at one layer only.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A web API's documentation says nothing about the order of items in a JSON list, which happened to be sorted by id. After an internal…
- A dependency-injection container registers ReportCache as a singleton, and ReportCache takes a DbSession in its constructor; DbSession is…
- Counting each if, loop header, and/or operator, conditional expression and except clause as one decision (V(G) = decisions + 1), what is…
- A function has three if-else statements in sequence, followed by a loop that runs either 0 or 1 time (decided by the input) and whose body…
- For a function of two independent bounded inputs, match each boundary-value technique with the number of test cases it needs. P. Normal…
- A decision table has three yes/no conditions and four rules: R1: C1 = N (C2, C3 don't care) → A; R2: C1 = Y, C2 = N (C3 don't care) → B…