← Back to Cost Avoidance Techniques Cost Avoidance Techniques

Queue-based load levelling and scale-out limits

Creatures
Scalix (#2), Loopuff (#3)
Effort
Not stated in source

Description

Smooth bursts of work through a queue and cap how far a service can scale out, so compute is not driven to its maximum by a spike, retry storm or downstream bottleneck.

How to apply it

  • Put queueing in front of downstream systems so messages are processed at a steady rate rather than as fast as possible.
  • Set scale-out limits to the maximum sustainable throughput of the downstream system (for example the database).
  • Cap retry policies and use dead-letter queues.
  • If you always need at least one node, spreading load over time may be cheaper than bursting; it is a trade-off.

Examples

  • Scalix: an Elastic Premium plan scaled from 1-2 nodes to 30. The database could not cope, messages retried until dead-lettered and the plan stayed scaled out for hours. Fix: lower max scale-out and add queue-based load levelling.
  • Loopuff: notes list "have scale out limits and load levelling" and "limit retry policies".

Trade-offs

Slower processing in exchange for lower cost. The source says "it's a trade off".

Related techniques