Re: Loadbalancing MongoDB

From: Wan Bachtiar <wan.bachtiar@xxxxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Sun, 8 May 2016 23:57:24 -0700 (PDT)
Why ads?


How can i download mongoDB source code for analyze it? 

Hi Andrew,

You can find the source code (master) for MongoDB on Github: MongoDB 
<https://github.com/mongodb/mongo>. For the latest stable release, which is 
currently at v3.2.6 
<https://www.mongodb.com/download-center?jmp=nav#community>, you can check 
out the tag tree r3.2.6 <https://github.com/mongodb/mongo/tree/r3.2.6>. 

In particolar where i can find the part of code that implements 
loadbalancing mechanism? 

By ‘load-balancing’, I assumed you mean the sharding balancing 
<https://docs.mongodb.com/manual/core/sharding-balancing/#sharding-balancing>. 
The cluster balancer 
<https://docs.mongodb.com/manual/reference/glossary/#term-balancer> is 
responsible for redistributing the chunks of a sharded collection evenly 
among the shards for every sharded collection. You could review the code 
for for the balancer (current stable v3.2.6) on src/mongo/s/balance.cpp 
<https://github.com/mongodb/mongo/blob/r3.2.6/src/mongo/s/balance.cpp>

You may also be interested in:

   - Maintaining a balanced data distribution 
   <https://docs.mongodb.com/manual/core/sharding-introduction/#maintaining-a-balanced-data-distribution>
   . 
   - Manage Sharded Cluster Balancer 
   <https://docs.mongodb.com/manual/tutorial/manage-sharded-cluster-balancer/>
   . 

Best regards, 

Wan. 


-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4e41f049-c304-4eab-bfc1-e6066559098e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?