CS FundamentalsModerateProduct-company placement · SRE interview
A service receives 2000 requests per second; each request holds a worker thread for 150 ms on average. It runs on 4 identical instances behind a load balancer. On average how many threads are busy on each instance?
- A. About 13
- B. About 300
- C. About 75
- D. About 3000
Correct answer: C. About 75
Little's law: in-flight requests = throughput × time in system = 2000 × 0.15 = 300 across the fleet, so about 75 per instance (plan the pool above that for bursts). 300 forgets the 4 instances and 13 divides instead of multiplying.
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 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…
- 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…