Can config server notify changes to all mongos?

When I change config server’s some setting through one mongos, how other mongos instantly know that change ? I suppose config server can register a hook that will be called to notify mongos when changes are made. In this way mongos needn’t restart.

Is this right ?

Hi @Lewis_Chan,

In a sense, I believe this is already been done from the direction of the mongos pulling the change instead of the config servers pushing the change.

For metadata change (chunk split, chunk move, etc.), the mongos will load the metadata lazily. For some changes, such as config server member change, the monitoring thread on the mongos will ping periodically and notices the change. Are these the cases you have in mind?

However, some major change e.g. movePrimary would require all mongos routers to be restarted in pre-MongoDB 4.4.

Best regards,
Kevin

1 Like