MechanismChapter III · Operations · Building block 6 of 10

Backpressure

Backpressure signals or forces producers to adjust their rate to processing capacity. Limited queues make overload and acceptance limits visible.

  1. CapacityInvoicing creates only a fixed amount.
  2. Limited queueAn upper limit keeps the waiting time small.
  3. ThrottleThe sender learns that he should send more slowly.

Context

Why this is important

If orders arrive faster than they are processed, the backlog grows until storage and waiting times slow down the system. Backpressure makes the border visible and slows the inflow. Bulkhead and Retry Storm deepen their own building blocks.

This building block deals with load flow and acceptance. Bulkhead isolates resource quotas; Retry Storm describes amplifying repeat waves.

At a glance · Backpressure brakes the producer

A limited buffer fills up when the consumer is slower; a signal slows down the producer.
Shop example · Playing through stages

Backlog before invoicing

After a discount promotion, orders arrive faster than invoice creation processes them. The shop limits the queue and throttles new background orders.

This is how you read the picture

  1. Capacity From more than 40 Orders/min the backlog grows.
  2. Limited queue With the switch, the queue remains 50 The waiting time, the waiting time, 1,3 Min.
  3. Throttle With Switch, the line “Thirded” shows how many orders go back per minute.
  • 200 ContractsBackwater after 10 min min
  • 5,0 min minWaiting time for a new invoice

In case of: 60/min increases the backlog 20 per minute, to 10 min are it 200 contracts. A new bill is waiting 5,0 Min.

Values illustrative

Increase the inflow through the processing of 40 Invoices/min and set the limited queue ()50 Places).

Benefits & limitations

Helps if:

  • Controllable producers can adjust their rate to consumer demand or acceptance signals.
  • Pipelines with bounded intermediate buffers need observable rules for backlogs and resumption.

Boundaries

  • For sources without a pause signal, bound admission and define rejection, retention or loss rules.
  • A buffer without inflow control only increases waiting time and storage load; monitor the size and age of the queue along with the processing rate.
  • Throttled or rejected requests need a defined outcome for the caller; specify it using Retry and Delivery guarantees.

In practice

  1. Map the feedback path. Identify producers, buffers, consumers and the point where rate or admission can be controlled. Check whether the signal reaches the source. This shows whether backlogs can actually be controlled.
  2. Bound buffering and define the response. Set maximum capacity, request age and behaviour when capacity is exhausted. Decide whether the source pauses, resumes later or handles a rejection. This makes memory use and user impact predictable.
  3. Measure the control effect. Observe demand, throughput, queue age, rejections and resumption. Check that the rate falls when capacity drops and rises in a controlled way after recovery. This demonstrates a working load-control feedback loop.
Read the detailed explanation

Backpressure communicates from consumer to producer how much more work can be accepted. Demand, pause signals or controlled rejection limit inflow. Small, bounded buffers absorb short peaks; sustained overload requires adjusting the source or explicitly rejecting work. The concept operates along a pipeline and complements resource isolation through Bulkhead and delivery through Queues, Pub/Sub & Streams.

A growing buffer converts overload into memory consumption, waiting time and stale work. Queue size, maximum age and resumption rules therefore belong in the capacity agreement. Backpressure works only when the signal reaches a controllable source. For producers that cannot be controlled, recipients need their own admission limits and explicit handling of rejected work.

Check your understanding

Test yourself in three stages

  1. ReadingCheck in the picture

    How long does a new account wait for 120 Orders/min, without and with limited queue?

    View the solution with justification

    Without limitation 20 min800 Orders Backlog after 10 min. With queue at most 1,3 min; 80 Orders/min are throttled.

  2. ApplyingTransferred to a new situation

    After a discount promotion, the bill queue reaches its limit while B-1042 arrives. How does the shop handle other background orders?

    View the solution with justification

    It throttles or delays the acceptance and reports the capacity limit to the producer. The orders will be offered again later, instead of allowing the queue to grow indefinitely.

  3. EvaluateWeighing an alternative

    The queue is not given a limit so that no order is rejected. What speaks in favour, what speaks against?

    View the solution with justification

    For this: Each order is accepted first. On the other hand, the backlog grows unnoticed, bills are delayed further and further, and the overload remains invisible to the producer.

Explore further

These optional deepenings complement the learning goal of this page.

Rate Limiting and Load Shedding

Rate limiting sets an admission limit per time interval, identity or resource to protect against excessive inflow. Load shedding selectively rejects work when capacity is scarce. Backpressure signals producers to slow down or pause. In the shop, a rate limit can bound checkout requests per customer, load shedding can reject low-priority recommendations, and backpressure can slow the shipping worker as its queue grows.

For testingFor the catalogue, checkout and shipping, decide whether a fixed rate limit, selective rejection or feedback to the producer fits best. Then measure waiting time, queue age and rejections, and check that customers receive a clear next action.

Continue on the learning path

Next in Runtime & operations: Observability.

10 Building blocks

Continue withObservability