Cơ BảnMongoDB iconMongoDB

Replica set trong MongoDB giải quyết vấn đề gì?

Replica set là nhóm mongod processes giữ cùng một dataset để cung cấp redundancy và high availability. Một primary nhận writes, secondaries replicate oplog và có thể phục vụ reads tùy read preference.

Khi primary fail, election chọn primary mới. App cần dùng connection string đúng replica set và xử lý retryable writes/reads vì failover có thể gây lỗi tạm thời.

Xem toàn bộ MongoDB cùng filter theo level & chủ đề con.

Mở danh sách MongoDB