Hi, Let's have a look at the example startup of a DBServer here:
https://docs.arangodb.com/3.0/Manual/Deployment/Local.html build/bin/arangod --server.authentication=false --server.endpoint tcp://0.0.0.0:8529 --cluster.my-address tcp://127.0.0.1:8529 --cluster.my-local-info db1 --cluster.my-role PRIMARY --cluster.agency-endpoint tcp://127.0.0.1:5001 primary1 & There are a couple of notable options involved here The agency is the central configuration store of the cluster. Any new cluster node will have to register itself there (--cluster.agency-endpoint). So the first thing that happens is the server will register itself there with a user defined identifier (--cluster.my-local-info), its address (--cluster.my-address) and its role (PRIMARY). During registering ArangoDB will create a cluster id for this server like DBServer001 which will then be used to communicate inside the cluster. Before all this has been successfully done this node is not used within the cluster. However as soon as this has been done the cluster will know that there is a new DBServer. Any client connecting to an ArangoDB cluster must connect to a coordinator. The dbservers are just dead stupid data stores. So whenver a new collection with replicationFactor>1 is being created the coordinator handling the creation will role the dices across all available DBServers and determine 1 leader and n followers and place the appropriate shards on these dbservers. The result is being saved in the agency so that any coordinator now knows that there is a new collection and how it is sharded and on which dbserver the shards have been placed. The only interaction the user had in this process was specifying a replicationFactor. Everything else being taken care of INSIDE the cluster and as a user you can't intervene or control anything in this process. So coming back to your example: There is not a main server in an ArangoDB cluster. All nodes are considered equal. The cluster configuration (including a list containing ids and addresses of the individual nodes) is saved in the agency. The cluster is figuring out leaders and followers on its own. This is a completely different setup than with async replication. Async replication setup has to be done by the user whereas synchronous replication is handled cluster internally. There is also an example of failover in the docs which should outline the sync replication: https://docs.arangodb.com/3.0/Manual/Administration/Replication/Synchronous/Implementation.html Am Mittwoch, 13. Juli 2016 08:21:03 UTC+2 schrieb Lalit Kumar: > > Started here https://github.com/arangodb/arangodb/issues/1934 > > > it is actually mentioned but indeed not really clearly: > > The cluster will determine suitable leaders and followers for every > requested shard (numberOfShards) within the cluster. > > The cluster organizes itself via the data saved in the agency and from > there it knows which servers form the cluster. Each server is registered > there with its address so you as the user have indeed nothing to setup ( > except for passing the correct startup parameters). > > During collection creation the cluster will choose from the pool of > dbservers which servers it should take and of course a dbserver can not > be follower and leader at the same time. So unless you are starting two > dbservers on the same machine leader and follower will always be on > separate machines. > > > > https://docs.arangodb.com/3.0/Manual/Administration/Replication/Synchronous/Implementation.html > > > I have read the Synchronous replication doc. Now I can understand the > logic behind the Synchronous replication. But I have the same question > again. > > > You are working on Arangoddb and had knowlegde of it. But I am not able to > relate or link all things. Let us I have two AWS EC2 instance with Arangodb > server on everyone. So I have started an arangodb server and started the > synchrounous replication on first one. So how it will know about the second > instance (i.e. ip adress or location etc)? Where we provide it on main > server? > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
