Data Center Awareness (DOCS-120)

[DOCS-305] Add Tag Aware Sharding Content Created: 28/Jun/12  Updated: 13/Nov/23  Due: 09/Nov/12  Resolved: 02/Feb/13

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.0, mongodb-2.2, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Sub-task Priority: Blocker - P1
Reporter: Sam Kleinman (Inactive) Assignee: Ed Costello
Resolution: Done Votes: 1
Labels: writing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by DOCS-620 Improve Tag aware sharding Docs Closed
is duplicated by DOCS-774 Documentation doesn't cover how to se... Closed
Related
related to DOCS-261 Migrate Sharding Documentation to Man... Closed
Participants:
Days since reply: 11 years, 17 weeks, 6 days ago

 Description   

http://www.mongodb.org/display/DOCS/Tag+Aware+Sharding



 Comments   
Comment by Sam Kleinman (Inactive) [ 18/Oct/12 ]

Tags on the Wrong Shard(s)

If chunks are found with a tag which are not appropriate to the tags on that shard they currently reside then they will be moved to an appropriate shards (containing that tag) – this happens independent of the thresholds listed above since it supersedes that algorithm.

Comment by Scott Hernandez (Inactive) [ 01/Sep/12 ]

probably best to show complete ranges from neg inf. to pos. inf.

Comment by Sam Kleinman (Inactive) [ 01/Sep/12 ]

The tags are set on the shards, and on ranges of the shard key (not
other fields in the document).

Here is a simple example of how to use it:

//Add tags to shards
sh.addShardTag("shard0000", "range1");
sh.addShardTag("shard0001", "range2");
sh.addShardTag("shard0001", "range3");
//Add ranges to chunks
sh.addTagRange("test.foo", {_id:0}, {_id:100}, "range1");
sh.addTagRange("test.foo", {_id:100}, {_id:200}, "range2");
sh.addTagRange("test.foo", {_id:200}, {_id:300}, "range3");

The arguments for addTagRange are the namespace (db.collection-name),
the min value of the shard key, the max value of the shard key, and
the tag that this range lives on (or is valid to balance to).

Comment by auto [ 29/Aug/12 ]

Author:

{u'date': u'2012-08-29T08:27:56-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: minor: DOCS-305 clarifications in the release notes
Branch: master
https://github.com/mongodb/docs/commit/d136ac893c8b5ba19124cf7930c766cef4c7f5ee

Comment by Sam Kleinman (Inactive) [ 27/Aug/12 ]

This needs more documentation, but we're stubbed enough to be complete for 2.2 release.

Comment by auto [ 17/Aug/12 ]

Author:

{u'date': u'2012-08-17T06:51:44-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: merge: DOCS-305
Branch: master
https://github.com/mongodb/docs/commit/51d3fc0a554f61bdf060cf013d02ee7770850665

Comment by auto [ 17/Aug/12 ]

Author:

{u'date': u'2012-08-17T06:49:55-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-305 additional corrections after technical review
Branch: master
https://github.com/mongodb/docs/commit/a9030cce8ce280d07218afaad98c335a81e14a06

Comment by auto [ 17/Aug/12 ]

Author:

{u'date': u'2012-08-16T12:08:28-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-305 tag aware sharding reference
Branch: master
https://github.com/mongodb/docs/commit/0666a0205f6559cdaf1d0298ddb5f135e58c689e

Generated at Thu Feb 08 07:38:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.