from the docs:
The config database contains the collections that contain the sharded cluster metadata. MongoDB writes data to the config database when the metadata changes, such as after a chunk migration or a chunk split.
How does config db knows about metadata changes?
How does it knows about chunk migration?
How config DB knows about shards? I see that: Mongos knows about configs (defined in configuration file). Mongos also knows about shard - we add them using addShard. But there is no direct link between config and shards? Is this all handled mongos?