[Bro-Dev] Broker::publish API

Jon Siwek jsiwek at corelight.com
Fri Jul 27 15:10:40 PDT 2018


On Fri, Jul 27, 2018 at 3:55 PM Azoff, Justin S <jazoff at illinois.edu> wrote:

> I do agree that there's room for a lot of simplification, for example a worker broadcasting a message efficiently to all
> other workers needs to do something like this from the docs:
>
>         Cluster::relay_rr(Cluster::proxy_pool, "example_key",
>                           Cluster::worker_topic, worker_to_workers,
>                           Cluster::node + " (via a proxy)");
>
> But a lot of that could have defaults:
>
> Most use cases would want to relay through the default proxy pool
> Since round robin is in use, they key shouldn't matter.

At the moment, one could write their own wrapper function around that
if they find it too verbose and always want to use certain defaults?

> The round robin part itself is really an implementation detail for proxy load balancing and maybe not something that
> should be exposed in the API.  Now that I think of it I'm not sure why one would ever use relay_hrw over relay_rr.

Theoretically, a more favorable load distribution that's consistent
over time?  e.g. if you do RR of the same messaging pattern from
multiple nodes, you could have waves of "randomly" overlapping loads
on the relayer-node since everyone is cycling through all the proxies
at their own rate when choosing the relayer.  With HRW, you'd stick
with the same relayer over time and only change on outages, but
everyone should have chosen their relayer in a uniformly distributed
fashion.

- Jon


More information about the bro-dev mailing list