NSQ Tutorial with #TurnkeyLinux

The following is a load balancing example with NSQ. More at https://github.com/itmarketplace/go-queue/tree/master/examples

On VirtualBox, run three Turnkey Linux VMs (using host-only adapter)

  • 192.168.56.101 – nsqlookupd and lbconsumer (nsq consumer client1)
  • 192.168.56.102 – nsqd and lbproducer (nsq producer client)
  • 192.168.56.103 – lbconsumer (nsq consumer client2)

192.168.56.101

nsqlookupd

lbconsumer

192.168.56.102

--lookupd-tcp-address = IP address of nsqlookupd
--broadcast-address = IP address of machine where 
nsqd is running
nsqd --lookupd-tcp-address=192.168.56.101:4160 
--broadcast-address=192.168.56.102

lbproducer

192.168.56.103

lbconsumer --lkp=192.168.56.101
Advertisements

Subjectivity aside, leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s