1

I am new to sharding feature of arangodb, I have learned various documents related to this, but still can't find the way to configure it. Anybody please provide the step-by-step procedure to setup sharding or any refrence which is useful for me. I am using arangodb with node.js and angularJS on linux mint.
I often visit https://docs.arangodb.com and these are little useful
https://docs.arangodb.com/2.5/Installing/Cluster.html and How to set clusters and sharding in ArangoDB?

Community
  • 1
  • 1

1 Answers1

2

sharding is only available in ArangoDB when its clustered. Except for that you configure the number of shards a collection is distributed into, its completely transparent to your AQL queries - the ArangoDB Coordinator instances do all the heavy lifting for you. Thats probably why shards don't appear in a more detailed way here.

The easiest way to set up an ArangoDB Cluster is to use Mesosphere DCOS - Click on ArangoDB and choose the environment to deploy your cluster to.

The more detailed manual about setting up clusters can be found here: https://docs.arangodb.com/3.0/Manual/Deployment/index.html Also featuring other installation methods. We will put more effort to explain sharding in clusters soon.

dothebart
  • 5,972
  • 16
  • 40
  • I had read the manual (https://docs.arangodb.com/2.5/Installing/Cluster.html) and configured accordingly. what next? I want to partition my database into shardes, but I dont know what to do next – Vinit Singh Jul 04 '16 at 04:38
  • 1
    With ArangoDB 3.0 [the cluster setup procedure changes](https://docs.arangodb.com/3.0/Manual/Deployment/Mesos.html).Once you've set up a cluster, [you create a collection and specify the number of shards](https://docs.arangodb.com/3.0/Manual/Administration/Sharding/index.html). The shard key controls the distribution of the documents over the shards. You should choose a number of shards bigger than your currently available cluster nodes, so if you increase the number of nodes, shards can be moved to these new nodes. You then can use regular AQL to query your data. – dothebart Jul 04 '16 at 08:21
  • got it. I have done what you have suggested but How do I come to know if actually shards are created or not? and how does it stores our data? – Vinit Singh Jul 04 '16 at 12:19
  • If you open the webinterface in your cluster, the collection properties will give you the number of shards. – dothebart Jul 04 '16 at 13:44
  • no..it shows as usual..I'm using arango 2.8, should I upgrade it? – Vinit Singh Jul 04 '16 at 16:36
  • 1
    Yes, you have to upgrade to 3.0 if you want to use the new cluster features (as well as the new web interface and many other features). Have a look at the recent [blog posts](https://www.arangodb.com/blog/) and see [Upgrading to 3.0](https://docs.arangodb.com/3.0/Manual/Administration/Upgrading/Upgrading30.html) in the documentation. – CodeManX Jul 05 '16 at 10:30