Database Reference
In-Depth Information
It's time to see the sharding status using the
sh.status()
command:
As you can see in the preceding screenshot, now we have two shards. The first one is a
replica set with the name
rs1
, and the second shard is a standalone
mongod
instance on
port
27016
.
If you create a new database on each shard, MongoDB syncs this new database with the
mongos
instance. Using the
show dbs
command, you can see all databases from all
shards as shown in the following screenshot:
Note
The
configuration database
is an internal database that MongoDB uses to configure and
manage the sharding network.