MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

Should Read Preference be Secondary by default?

I’ve noticed that by setting collection read preference to secondary read query response times have improved at least 10x. Shouldn’t this be default?

Right setting of read preference is based on your use case. Reading from secondaries is faster, but can be tricky when some data is not replicated to secondaries - than eg. old version of document can be returned.

See behavior section in docs - https://docs.mongodb.com/manual/core/read-preference/