Loading...
Loading...
Browse 7 real-world technical and behavioral interview questions about Backpressure. Review scenarios, edge cases, and architectural best practices.
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.
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 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.
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.
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.
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.
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.