I’m trying to learn more about how the Erlang distribution works under the hood, and have been poking at busy_dist_port
failures in particular. This paragraph in the erl_cmd
docs intrigued me (emphasis mine)
A larger buffer limit allows processes to buffer more outgoing messages over the distribution. When the buffer limit has been reached, sending processes will be suspended until the buffer size has shrunk. The buffer limit is per distribution channel . A higher limit gives lower latency and higher throughput at the expense of higher memory use.
I cannot seem to find what this “distribution channel” is, or how it relates to the distribution buffer.
Some experimentation has shown me that I can deliberately fill the distribution buffer when sending messages to one node, and get suspended, but still end messages to another node. I assume from these experiments that a “distribution channel” refers to my connection to other nodes, but I was wondering if there was a more formal definition that I am not finding.
Is the “distribution channel” as simple as the connection between nodes? Is there a buffer on each end of the channel (on the sender and the receiver)?
If there’s somewhere I can read more about this, it would be much appreciated