Topology in distributed environment

67 views
Skip to first unread message

Angelo Coiro

unread,
Feb 12, 2016, 2:21:08 PM2/12/16
to nsq-users
Hi all,
I read in the doc that it is reccomneded to run nsqd co-located with services producing messages.
First, does that mean that the two processes (nsqd and the "message producer") should be on the same machine?
If so, what is the motivation?
I would rather like to have a cluster of nsqd with a load balancer completely independent from the cluster of nodes that produce messages.

Jud White

unread,
Feb 13, 2016, 4:59:12 AM2/13/16
to nsq-users
We have both the co-located and load balancer topologies deployed in production.

It's simpler to have nsqd co-located with the producer. If you don't have to set up LTM/monitoring it's less operational overhead to just publish to localhost. It's also less network overhead, if that's a concern. I believe these are some of the reasons for the recommendation, though it depends on your use case and how segmented your organization is.

Sometimes we'd rather install nsqd on different boxes than the message publishers, or use an existing cluster for new publishers, usually to keep a cluster's responsibilities clean. In this cases we either round robin with a well-known set of nsqd instances or use a VIP.

Both approaches work well for us.

Angelo Coiro

unread,
Feb 15, 2016, 5:58:38 AM2/15/16
to nsq-users
Thank you for your answer.
I think I'll opt for the load balancer solution so as to have two independent clusters.
Reply all
Reply to author
Forward
0 new messages