Replication and sharding clarification

hai everyone, Can anyone help with the below doubts:

  1. Whether MongoDB have any architecture like Master to Master replication like MySQL?
  2. In sharded cluster whether there is any option that the complete data is available in all sharded replica sets?

Welcome to the community @Vijo_Jose :grinning: !

  1. No but in case of master failure, automatic election of a new one.
  2. Yes you talk about read concern.

We see in your two questions, especially the second, a lack of knowledge of the MongoDB architecture.
I recommend you take the free M103 MongoDB University course. You will discover how replica sets and sharding work.

Sure i have joined the course today.

But I have question . Can you please clarify on that.

I have done the shading with 3 config server and 2 shared cluster server between my two locations.
Config server have location A 2 server and location B one server and location A is primary.

Shared replica set 1 : have location A 2 server and location B one server and location A is primary.
Shared replica set 1 : have location B 2 server and location A one server and location B is primary.

and 1 mongo router in Location A and Location B.

In the above case : when the connectivity between lose between Location A ad Location B my mongo router my complete system goes down and when am acessily through router am getting below error;

“code” : 133,
“codeName” : “FailedToSatisfyReadPreference”,

I want to achieve something like below image. when the connectivity also i shoud be able to read and write on my both locations.

Can someone help on this ?