0

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.

Possible options (where [...] is a docker container):

1) Single NSQD:

[producer1]
[producer2]
[nsqd]

2) NSQD within each producer:

[producer1 + nsqd]
[producer2 + nsqd]

3) NSQD for each producer

[producer1]
[nsqd1]
[producer2]
[nsqd2]
Paul
  • 144
  • 1
  • 6

1 Answers1

0

Docker approach is one service / one container.

And docker-compose makes orchestration of services as easy as if they were in one container (or even easier, because you can use canonical images from service providers instead of building your own)

Also whole Docker infrastructure is well-aligned for maintaining single-process containers.

grapes
  • 6,688
  • 1
  • 13
  • 29