Messaging Patterns: Throttling

Only keep one event per time unit from a high frequency stream.

Published on 23 May 2019 by @mathiasverraes

Throttling

Only keep one event per time unit from a high frequency stream.

Problem

A stream of Ephemeral Events is too much to handle for a consumer.

Solution

An intermediary consumer is placed in front of the original consumer. It drops all events, except once per time unit, where it passes the event to the original consumer.

Example

This pattern is very common in user interfaces. An input device, such as a mouse, emits it’s position at 500 Hz. Instead of rendering at the same frequency, the stream is throttled at 5Hz, and therefore the consumer only needs to rerender 5 times per second.

Follow @mathiasverraes on Twitter.



Upcoming

Have a look at our upcoming workshops
Past agenda entries...

Blog

2019

2016

2015

2014

2013

2012

2011

Creative Commons License This work by Mathias Verraes is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License.