<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">The Erlang distribution is good for signal plane and not optimal for data plane…</div><div class=""><br class=""></div><div class="">1000 messages per second is less then 1MB for interprocess communication. You’ve also missed the number of nodes in your cluster. Therefore, it is not clear what is the bandwidth requirements per link.</div><div class=""><br class=""></div><div class="">The broadcast of messages would not an optimal for highly-loaded production systems but pre-mature optimisation is an evil.</div><div class=""><br class=""></div><div class="">* Go with broadcast as first and rapid PoC implementation. </div><div class="">* Optimise it with group proxy to save bandwidth of inter-node links.</div><div class="">* Go with external data plane channels (e.g. TCP) or external queue systems.</div><div class=""><br class=""></div><div class="">- Dmitry</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Nov 2017, at 10.03, Stefan Hellkvist <<a href="mailto:hellkvist@gmail.com" class="">hellkvist@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Each process (or "user" if you prefer the group chat analogy) could send a message, say once every second. So if there are 1000 processes in one such "room" there are 1000 messages per second. Then there could be many such "rooms" also in the system, running on different nodes, but that is in the order of 10 at most. </div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Nov 23, 2017 at 8:55 AM, Sergej Jurečko <span dir="ltr" class=""><<a href="mailto:sergej.jurecko@gmail.com" target="_blank" class="">sergej.jurecko@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You neglected to mention a critical aspect. How often are you broadcasting?<br class="">
<br class="">
Regards,<br class="">
Sergej<br class="">
<div class=""><div class="h5"><br class="">
> On 23 Nov 2017, at 08:49, Stefan Hellkvist <<a href="mailto:hellkvist@gmail.com" class="">hellkvist@gmail.com</a>> wrote:<br class="">
><br class="">
> Hi all enlightened people,<br class="">
><br class="">
> Suppose that you, in a distributed Erlang setup, have a process A, running on one of the nodes, which, in its state, holds pids B1, B2, ..., Bn, where each process B could be running on any of the nodes in the cluster. Suppose further that you want to typically broadcast messages to all processes (B1 through Bn) - the same message to all processes (you can think of it as a "group chat" if you like where "A" is the room and B1-Bn are the users joining the room - seeing everything posted there - or you could see it as a message bus for a topic "A"). The number n here could be in the order of "2-10 thousands" and messages are typically not huge but perhaps not tiny either (< 1kB).<br class="">
><br class="">
> In such a setup, if you want to minimize the time to distribute the message to all processes B1 to Bn (the time between when the first B receives the message to the last), would you consider it be worth to try to minimize the amount of traffic between the nodes, by, let's say, grouping all processes belonging to the same node and instead adding such groups to the process A? Then there would be one message going between the nodes and then the local groups on each node take care of sending it to all its local processes (under the assumption that local message passing has a lower cost than inter-node message passing). Is there even such library out there that does something similar? I know of pg and pg2 but the goals of these modules is not about minimizing node-to-node traffic if I understand them correctly.<br class="">
><br class="">
> Or perhaps others are approaching such broadcasting of messages in different ways that does not rely on Erlang message passing at all - such as relying on multicast or using message buses (such as Rabbit or NATS)? Perhaps that is a better approach? I suppose "measuring" is the answer here...but perhaps someone has done similar comparisons already?<br class="">
><br class="">
> /Stefan<br class="">
><br class="">
</div></div>> ______________________________<wbr class="">_________________<br class="">
> erlang-questions mailing list<br class="">
> <a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank" class="">http://erlang.org/mailman/<wbr class="">listinfo/erlang-questions</a><br class="">
<br class="">
</blockquote></div><br class=""></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>