CS FundamentalsHardProduct-company placement · system design

A producer emits 10,000 events per second into a stream whose consumer can process 2,000 per second. Which reactive-streams mechanism lets the consumer stop the producer overwhelming it?

  1. A. Backpressure, where the consumer signals how many items it can take
  2. B. Retry with exponential backoff on the producer
  3. C. A circuit breaker on the consumer that opens when it is busy
  4. D. Idempotent consumers that ignore duplicates

Correct answer: A. Backpressure, where the consumer signals how many items it can take

Backpressure makes demand flow upstream (request(n)), so the producer slows, buffers or drops by policy instead of filling the consumer's memory. The other options deal with failures or duplicates, not rate.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic