3 ms·
BEAM has some backpressure; it used to have more. If you send to a remote process, and the dist buffer is full, you'll be suspended. (Or you can send with no_s
by toast0 3y ago
BEAM has some backpressure; it used to have more.
If you send to a remote process, and the dist buffer is full, you'll be suspended. (Or you can send with no_suspend, and drop rather than suspend).
When you send to a local process, you need to lock that processes's mailbox, which offers a little bit of backpressure if there's contention. Doesn't provide backpressure when the recipient process is just ignoring its mailbox, though.
IIRC, earlier releases, maybe around r12-r16 would penalize processes that sent to a local process with a big mailbox, but I think that was removed because it didn't really work as envisioned, so better not to have the complexity.
There's ways to build systems that are resilient to large mailboxes, but it's not necessarily simple.