Can we run multiple replicas of the services in docker swarm?

600 views
Skip to first unread message

JMarc

unread,
Jan 26, 2022, 7:01:18 AM1/26/22
to dcm4che
Hi,

I have been reading through the instructions for installing using docker swarm:

I can see it's distributing the services over three hosts (or nodes) and the 8 containers are spread across these with constraints about which node it needs to run on.

After everything is set up we have only one replica of each service.

I assume the service will go down if, for example, the archive node has an issue.

So how to add a second worker node into the archive node role?

And can we add replicas of the services for example multiple arc services?
How about the db and ldap services, can multiple replicas of those also run at the same time?

JMarc

unread,
Jan 26, 2022, 7:35:18 AM1/26/22
to dcm4che
Just to clarify the question. The main question here is has the software been built in such a way that it can have multiple replicas running at the same time or are there some restrictions?
For example, the database and the LDAP both make updates, and not sure can there be multiple instances writing at the same time or not.

I can see that scaling could be done similarly as "docker service scale helloworld=5"

And perhaps the node constraint could be written differently as for example "--constraint node.labels.role==archive"

So then if I have 2 workers in the docker cluster I could scale the service to 2 and it would run one instance on each worker.

Gunter Zeilinger

unread,
Jan 26, 2022, 3:02:56 PM1/26/22
to dcm4che
No. LDAP and DB will definitely not work, the archive only if mounting an external NFS as storage directory.

Gunter Zeilinger

unread,
Jan 26, 2022, 6:24:27 PM1/26/22
to dcm4che

No. LDAP and DB will definitely not work, the archive only if mounting an external NFS as storage directory.
 
or any cloud storage supported by Apache jclouds BlobStore API.

JMarc

unread,
Jan 27, 2022, 1:50:11 AM1/27/22
to dcm4che
Thanks for the reply.

So I guess to achieve fault tolerance the way to go would then be to set up a second docker cluster in swarm mode with a second independent DB and LDAP?
Then somehow setup DICOM replication between the two clusters.

Not sure would it be semi-fault-tolerant with just one cluster if there is a spare node for each service and would the docker master then see if a service goes down and try to spin it back up on a second node.

Gunter Zeilinger

unread,
Jan 27, 2022, 3:17:11 AM1/27/22
to dcm4che
There may be also running multiple services of the same type, but different identity in one Docker swarm. We always setup a second docker swarm if there are two data centers in separate network segments and often also in different locations.

JMarc

unread,
Mar 28, 2022, 4:42:39 AM3/28/22
to dcm4che
Thanks for the additional information. I'm hoping to clarify still another thing.

"We always setup a second docker swarm if there are two data centers"
So would those two datacenters then use DICOM replication to send the studies they receive to each other so that bot datacenters have a copy of all the data?

Is this forwarding the preferred approach for achieving this?

Then running some compare task to make sure they stay in sync?

Gunter Zeilinger

unread,
Mar 28, 2022, 6:37:48 AM3/28/22
to dcm4che
On Monday, March 28, 2022 at 10:42:39 AM UTC+2 JMarc wrote:
Thanks for the additional information. I'm hoping to clarify still another thing.

"We always setup a second docker swarm if there are two data centers"
So would those two datacenters then use DICOM replication to send the studies they receive to each other so that bot datacenters have a copy of all the data?

Is this forwarding the preferred approach for achieving this?

Right.


Then running some compare task to make sure they stay in sync?

No. We rather configure https://github.com/dcm4che/dcm4chee-arc-light/wiki/Forward-RESTful-services-to-other-archive to sync changes - particularly done using the UI between both sides.

Shazil rajpoot

unread,
Mar 28, 2022, 6:57:35 AM3/28/22
to dcm...@googlegroups.com
Hello dear...

How we can call a dicom image on browser. Pass the local path 

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/8e7749eb-e528-4f95-88f7-3144aeb18c7cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages