nsqd in docker container

82 views
Skip to first unread message

PaulEngineer

unread,
Jan 15, 2019, 10:52:04 AM1/15/19
to nsq-users
How should nsqd be used in a live microservices docker environment?

Should we run nsqd in its own docker container or should each container that runs a producing service also contain an instance of nsqd?

I've not managed to find any examples of how to run a (for example) a Java/Spring service and an nsqd instance within the same container so I'm wondering what everyone else does.

Thanks.

Matt Reiferson

unread,
Jan 26, 2019, 2:39:39 PM1/26/19
to PaulEngineer, nsq-users
Because nsqd writes some data to disk (overflow), I think the best way to think about it is to treat nsqd like a database. Deploy it however you would operate other persistent datastores.

Mradul Maheshwari

unread,
Jan 28, 2019, 2:29:01 AM1/28/19
to nsq-users
If you question is related to the best practices than may be you can skip reading my response.

In my opinion the producer should be a separate service and nsqd cluster or single instance nsqd should be a different instance. This would allow you to seamlessly change from the nsq to any other pub/sub service. I have in my development environment a single instance of nsqd service, deployed in a container and the producers and consumers in different containers.

Paul Curren

unread,
Jan 28, 2019, 6:33:41 AM1/28/19
to nsq-users
We've done some testing/development now.

Initially we just used the pre-built Docker container to run nsqd as a single instance. This didn't give great results.

We are now adding the nsqd executable to each of our Docker containers that contain producers - seems to be much better.

Still running nsqlookup in a separate container.

Mradul Maheshwari

unread,
Jan 28, 2019, 7:16:49 AM1/28/19
to nsq-users
At what scale are you testing this. It would be helpful if you can share what are number of producers, consumers, number of topics, channels. May be I can also try with those number and see, if I also see the degraded performance.


On Monday, January 28, 2019 at 5:03:41 PM UTC+5:30, Paul Curren wrote:
We've done some testing/development now.

Initially we just used the pre-built Docker container to run nsqd as a single instance. This didn't give great results.
[MM] What were the option with which nsq was deployed. Where the resources for the container same as compared to the containers in which producer reside?
Reply all
Reply to author
Forward
0 new messages