All labs
Lab 15
Agentic AI

Backpressure — Why a Broker Absorbs Spikes

Push traffic past capacity with no broker and watch the waiting room overflow and drop requests. Add a broker and the same spike is buffered safely — nothing lost — then add a consumer to drain it.

The one idea: putting a broker between producers and consumers lets the system absorb a burst instead of dropping it. That's the how (communication) axis — independent of where the code runs → see Topology vs Communication.
6 req/s
quiet⚠ over capacity (2/s)viral
Incoming
6/s
Handled
0/s
Dropped / timed out
0
drops past 8 waiting
💬
Producers
6/s
⏳ Waiting roomholds 8
empty — keeping up
Requests wait in memory for the consumer.
Consumers
C1
2 req/s total

Push the rate past capacity and watch the waiting room fill, then start dropping requests — there is no buffer to catch the spike.

Direct or broker? — classify each call

A broker is powerful, but it isn't free — it adds a hop and eventual consistency. For each operation in the contract-risk agent, decide whether it should stay a direct call (the user is waiting) or go through the broker (background, fan-out or long-running).

Answer the manager's question (retrieve → analyze → respond)
Look up the vendor in ERP for this request
Re-score 40 contracts overnight
Route this contract for legal + finance approval
Write the audit-trail entry
Notify the reviewer
What just happened