Skip to content

Implementation of Andy X Replicated Async Cluster #89

Open
@eneshoxha

Description

@eneshoxha

As a User of Andy X I would like to deploy more than one instance of Andy X and connect them as a Cluster.

On Andy X there will be three different node links within a andy x cluster.

  • Distributed Sync & Async Nodes,
  • Replicated Nodes
  • Production Cluster (connection between distributed and replicas)

Replicated Async Cluster

The configuration of nodes in Replicated Async Cluster is done in the logic of Master/Slave, in terminology of Andy X we are using Main and Worker Nodes.

v1-replicated-async-cluster-1

As is described in the diagram above, when a Producer is connected to Node 1 which is the MAIN NODE, when messages are accepted and stored in the node, asynchronously messages will mirror to other WORKER NODES. In the consumer is conencted as in the diagram to Node 3, it will consume messages already stored in Node 3.

Producers connected in different Nodes in the same topic

v1-replicated-async-cluster-different-producers

In case as is shown in the diagram above, Producer_2 is producing message 4 into Node 2 (which is a worker node), this message will be stored in a temp storage for the main node, the processing and storing will happen from the Main Node, as soon as is processed from Node 1 (main node), the message will be replicated to other worker nodes.

If the Main Node will go down, one of the working nodes will act as Main Node.
v1-replicated-async-cluster-master-down

the switch between Main and Working Nodes can be done via Andy X CLI and Andy X Portal, by Promoting Nodes.

    andyx cluster "default_01" promote "node_2"

The configuration of the cluster is done in cluster_config.json
example

{
	"Name": "default_01",
	"Shards": [
		{
			"replicas":[
				{
					"NodeId": "01"
				},
				{
					"NodeId": "02"
				}
			]
		},
		{
			"replicas":[
				{
					"NodeId": "03"
				},
				{
					"NodeId": "04"
				}
			]
		},
		{
			"replicas":[
				{
					"NodeId": "05"
				},
				{
					"NodeId": "06"
				}
			]
		}
	]
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestv3.x.xAndy X V3 Tasks

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions