Mongodb version difference between config and mongos

mongodb

In my mongodb config server has 3.4 version and mongos has 3.6 version but i am unable to start mongos service should both be same version as 3.6 then i have rollback both to 3.4 version now the mongos service started.my doubt is the config server and mongos server should have same version as 3.6 to start the mongos service

Best Answer

As Per MongoDB BOL Starting in 3.4, the use of the deprecated mirrored mongod instances as config servers (SCCC) is no longer supported. Before you can upgrade your sharded clusters to 3.4, you must convert your config servers from SCCC to CSRS.

To convert your config servers from SCCC to CSRS, see Upgrade Config Servers to Replica Set.

Where Config servers store the metadata for a sharded cluster. The metadata reflects state and organization for all data and components within the sharded cluster. The metadata includes the list of chunks on every shard and the ranges that define the chunks.

The mongos instances cache this data and use it to route read and write operations to the correct shards. mongosupdates the cache when there are metadata changes for the cluster, such as Chunk Splits or adding a shard. Shards also read chunk metadata from the config servers.

MongoDB also uses the config servers to manage distributed locks.

Each sharded cluster must have its own config servers. Do not use the same config servers for different sharded clusters.

WARNING: Administrative operations conducted on config servers may have significant impact on sharded cluster performance and availability. Depending on the number of config servers impacted, the cluster may be read-only or offline for a period of time.

For your further Ref Here and Here