-
Notifications
You must be signed in to change notification settings - Fork 58
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
MongoDB Sharding document #430
Conversation
- ***config servers:*** Config servers store metadata and configuration settings for the cluster. As of MongoDB 3.4, config servers must be deployed as a replica set (CSRS). | ||
|
||
<p align="center"> | ||
<img alt="sharded-cluster" src="/docs/images/mongodb/sharded-cluster.png" width="620" height="440"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add source of these images.
|
||
The mongos selects the primary shard when creating a new database by picking the shard in the cluster that has the least amount of data. mongos uses the totalSize field returned by the listDatabase command as a part of the selection criteria. | ||
|
||
Diagram of a primary shard. A primary shard contains non-sharded collections as well as chunks of documents from sharded collections. Shard A is the primary shard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is it Diagram of a primary shard.
?
- `spec.shardTopology` represents the topology configuration for sharding. | ||
- `shard` represents configuration for Shard component of mongodb. | ||
- `shards` represents number of shards for a mongodb deployment. Each shard is deployed as a [replicaset](/docs/guides/mongodb/clustering/replication_concept.md). | ||
- `replicas` represents number of replicas of each shard replicaset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means total number of pods = 1 + replicas?
mongodb.kubedb.com/mongo-sh created | ||
``` | ||
|
||
Here, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the word pod
instead of node
here to clarify that this is k8s pod (or db node, not k8s node)
- `replicas` represents number of replicas for configServer replicaset. Here, configServer is deployed as a replicaset of mongodb. | ||
- `prefix` represents the prefix of configServer nodes. | ||
- `configSource` is an optional field to provide custom configuration file for configSource (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used. | ||
- `podTemplate` is an optional configuration for pods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to point to a doc that explains the options available to a podTemplate
.
Signed-off-by: Tamal Saha <[email protected]>
No description provided.