Backend Developer Interview Question

Traffic doubles and your service starts queuing requests until everything times out. What do you do about it?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

Apply backpressure instead of buffering. Bound every queue, shed load early with a 429 or 503 when concurrency limits are hit, and reject requests whose deadline has already passed rather than working on them. Unbounded queues convert an overload into a latency collapse, because every request waits behind work nobody is waiting for any more. Prioritize by tier if some traffic matters more, and autoscale on a signal that leads, such as queue depth.

Why interviewers ask this

This distinguishes people who have been on call during an overload from people who have not. The interviewer wants to hear that a queue is not free capacity, that shedding load is a legitimate design choice, and that dropping stale work restores throughput. It also probes whether you know the queueing intuition: past saturation, latency rises without any increase in useful throughput.

How to structure your answer

  • Explain why buffering makes overload worse, not better.
  • Bound the queues and shed load with an explicit status code.
  • Drop work whose deadline has expired.
  • Add prioritization and a scaling signal that reacts in time.

Example answer

Spoken example, first person

The instinct is to add a bigger queue, but that just converts an overload into slow failure, because every request sits behind a backlog and by the time it is served the client has already given up. So the first thing I do is bound the queue and add a concurrency limit, and when it is full I return 503 with a retry after immediately. Rejecting fast is kinder than timing out slowly, both for the user and for the system. Second, I check the deadline before doing the work: if the request has been waiting longer than its budget, I drop it, which frees capacity for requests that can still succeed. That single change is the one that visibly recovers throughput during an incident. Then prioritization, because not all traffic is equal; on one system we shed background sync traffic first and kept interactive requests flowing. And I scale on queue depth or concurrency rather than average CPU, since CPU flattens near saturation and reacts far too late to be useful.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How would you choose a concurrency limit rather than guessing one?
  • What is the difference between load shedding and rate limiting here?
  • How do you make sure shed requests do not all retry at once?

Related backend developer questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot