[erlang-questions] Kill process if message mailbox reaches a certain size (was discarding signals)
Bob Ippolito
bob@REDACTED
Thu Jun 16 05:25:42 CEST 2011
On Wed, Jun 15, 2011 at 8:11 PM, József Bérces
<jozsef.berces@REDACTED> wrote:
> Thanks for all the thoughts and suggestions. If I got it right, there were two main branches:
>
> 1. Avoid the congestion situation
> 2. Detect and kill/restart the problematic process(es)
>
> The problem with these approaches that the Erlang applications are not just playing with themselves but receive input from other nodes. Those nodes can be very numerous and uncontrollable.
>
> As an example, just let's take the mobile network where the traffic is generated by millions of subscribers using mobile devices from many vendors. In this case we (1) cannot control the volume of the traffic and (2) cannot make sure that all the devices follow the protocol.
> So there can be situations when we cannot avoid congestion simply because the source of the traffic is beyond our reach.
The Erlang distribution protocol is only suitable for connecting a
relatively small number of trusted nodes on a LAN.
If you were to expertly implement such an application you would have
some Erlang nodes speaking to these mobile devices, but with another
protocol (probably over TCP), and then you would have as much control
as you need over the other details. For example, you can avoid
congestion by rate limiting or refusing to accept new connections.
When the Erlang nodes speak to each other (with or without Erlang
distribution), you also control that protocol and can avoid congestion
there as well.
-bob
More information about the erlang-questions
mailing list