if I use a mongodb cluster with three shards ,how can i connect all of the
Generally, in a sharded cluster it is recommended that an application
connects to a mongos
<https://docs.mongodb.org/manual/reference/program/mongos/> instead of the
shards primary individually. A mongos instance route the reads and writes
from application(s) to the shards. An application don’t normally connect to
more than one mongos.