content_image/833012.jpg
multiple shards 12 to fulfill these queries. 

## Sharded and Non-Sharded Data 

Sharding operates on the collection level. You can shard multiple collections within a database or have multiple databases with sharding enabled. 13 However, in production deployments, some databases and collections will use sharding, while other databases and collections will only reside on a single shard. 

<img src='content_image/833012.jpg'>

Regardless of the data architecture of your sharded cluster , ensure that all queries and operations use the mongos router to access the data cluster. Use the mongos even for operations that do not impact the sharded data. 

## Tag Aware Sharding 

MongoDB supports tagging a range of shard key values to associate that range with a shard or group of shards. Those shards receive all inserts within the tagged range. 

The balancer obeys tagged range associations, which enables the following deployment patterns: 

• isolate a specific subset of data on a specific set of shards. 

• ensure that the most relevant data reside on shards that are geographically closest to the application servers. 

This document describes the behavior, operation, and use of tag aware sharding in MongoDB deployments. 

