Cluster

JGroups

The cluster exchanges information and tasks via the JGroups framework. The whole networking depends on it. The above config works with non-Swarm mode in Docker. If you have Swarm that is capable of multicasting then you might need to read more on JGroups either here and/or here.

Initial Hosts

When clustercode starts, it tries to contact this list of hosts and connect to them. You can specify multiple IPv4, IPv6 or DNS hostnames in the form of node-1[7600],node-2[7600] in CC_CLUSTER_JGROUPS_TCP_INITIAL_HOSTS. Don’t specify localhost anymore.

External Address

When JGroups creates a socket in Docker, it will be on eth0. eth0 is a virtual NIC inside the container. So other cluster nodes cannot connect to this virtual address. Instead, they need to contact the physical machine on the specified port. Docker then routes the traffic to the correct container. So if your Docker node is reachable on IP 10.10.10.45, you need to set CC_CLUSTER_JGROUPS_EXT_ADDR to 10.10.10.45. This may or may not be needed in Docker Swarm mode, I haven’t tested it.

Arbiter Node

If set to true, the local node will not convert any video files whatsoever, but rather partake in the cluster communication. If you have two nodes and there happens to be a split-brain, it is hard to recover from it. If you have a 3rd node but it’s not powerful enough for encoding then you can still add it to cluster in arbiter mode. With three cluster members, a split-brain can be prevented if one node is down. Use this to provide a quorum.