Top 7 Backpressure Interview Questions
Browse 7 real-world technical and behavioral interview questions about Backpressure. Review scenarios, edge cases, and architectural best practices.
A dependency that normally answers in 80ms starts taking eight seconds. What in your service reacts, and in what order?
A timeout shorter than the caller's patience is the only defence that works without cooperation. Retries need idempotency, jitter and a budget or they amplify the outage; a breaker must trip on latency as well as errors; and a bulkhead is what stops one slow dependency consuming every thread.
Traffic is a hundred times normal and some of it is real customers. What do you drop first?
A DDoS or 100x traffic spike needs load shedding that separates real users from abusive or low-value work. Absorb volume at the edge, serve cacheable requests, protect checkout paths and reject expensive new work quickly before queues amplify retries.
A job queue is backed up four hours and half the jobs are now pointless. What do you drain, and what do you drop?
A job queue backlog should be classified into expired jobs, superseded jobs and still-required jobs. Drain the last fully; shed expired work with a record and collapse superseded work by key. Deadlines and collapse keys must be written at enqueue time. It also connects backpressure to the point an interviewer is testing.
Consumer lag on your orders topic climbs every morning and never clears before the next peak. Work through it.
Lag is the integral of arrival rate minus service rate, so establish which of the two moved and whether the consumer is slow or stalled. Check lag per partition before per group, rule out a rebalance loop, and remember that adding consumers beyond the partition count does nothing.
Design a producer-consumer pipeline with a bounded buffer. What do you do when the buffer is full?
A producer-consumer bounded buffer applies backpressure to the producer instead of letting an unbounded queue absorb overload until the process dies. Deciding what a full buffer does - block, drop, or reject - is the decision that determines how the system fails.
Why would you stream a large file rather than read it into memory, and what is backpressure?
Node.js stream backpressure prevents a fast producer from filling memory while a slow consumer catches up. The core signal is write() returning false and the producer waiting for drain before sending more.
Your broker stops accepting writes for twenty minutes. What does each producer do, and what should you have decided before it happened?
Every producer must have a declared answer — block, buffer to a bounded local store, or drop — chosen per event class rather than once for the whole fleet, because the default of blocking on a full in-memory buffer turns a broker outage into an outage of every service that publishes to it.