[erlang-questions] Questions about processes and message queues

Thomas Lindgren thomasl_erlang@REDACTED
Wed Feb 4 14:53:18 CET 2009




--- On Tue, 2/3/09, Nicola Lugato <nicola.lugato@REDACTED> wrote:

> i have some doubt about processes and message queues.
> What does happend if a fast process keeps sending messages
> to a slow
> process? Does the queue keeps growing arbitrarly or is
> there some kind of
> limiting mechanism ? If so, how does it work exacly?

There is no builtin limiting mechanism in Erlang itself. For example, it has traditionally been easy to overwhelm processes receiving trace messages (which can be generated at a high rate). And while recent schedulers prefer to run processes with long message queues, which relieves such problems, you can still mess around with process priorities yourself and force the same problem to appear.

Well, there is nature's own rate limiter: node crash.

If this is an issue, you will have to design your process communication to have some sort of backstop, and/or tolerate node failures.

Best,
Thomas




      



More information about the erlang-questions mailing list