Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Andy X Replicated Async Cluster #89

Open
eneshoxha opened this issue Jul 3, 2022 · 0 comments
Open

Implementation of Andy X Replicated Async Cluster #89

eneshoxha opened this issue Jul 3, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request v3.x.x Andy X V3 Tasks
Milestone

Comments

@eneshoxha
Copy link
Contributor

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"
				}
			]
		}
	]
}
@eneshoxha eneshoxha self-assigned this Jul 3, 2022
@eneshoxha eneshoxha added the enhancement New feature or request label Jul 3, 2022
@eneshoxha eneshoxha added this to the v3.0 milestone Jul 3, 2022
@eneshoxha eneshoxha added bug Something isn't working v3.x.x Andy X V3 Tasks and removed bug Something isn't working labels Jul 8, 2022
@eneshoxha eneshoxha modified the milestones: v3.0, v3.1 Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v3.x.x Andy X V3 Tasks
Projects
None yet
Development

No branches or pull requests

1 participant