Pingerchips LogoPingerchips
Pingerflows

Debounce Node

The debounce node implements trailing-edge debouncing: every incoming message resets a timer, and only the last message is processed after the timer expires with no new arrivals.

When to Use

  • Collapse rapid-fire user input (e.g. typing indicators, search-as-you-type)
  • Wait for a burst of updates to settle before broadcasting
  • Prevent redundant processing when many events arrive in quick succession

How It Works

  1. A message arrives → it is parked (not forwarded) and the debounce timer is (re)started.
  2. If another message arrives before the timer fires → the timer resets with the new message.
  3. When the timer fires with no new arrivals → the last parked message is re-enqueued and runs through the pipeline again from the top.
  4. On the second pass the debounce node detects the re-enqueued marker and passes through.

Debounce is in-memory per node (backed by ETS). State is local to the server instance and resets on restart.

Configuration

FieldTypeRequiredDefaultDescription
windownumberYesQuiet period to wait
unitstringNo"ms"Time unit: "ms", "s", or "m"

Examples

Debounce with a 300 ms window (good for typing indicators):

{ "window": 300 }

Debounce with a 2 second window:

{ "window": 2, "unit": "s" }

Difference from Throttle

ThrottleDebounce
Which message passesFirst in windowLast after quiet period
Dropped messagesAll after the first within windowAll except the final one
Use caseRate limitingCollapse bursts

Next Steps

On this page