Trung BìnhMongoDB iconMongoDB

Read concern và write concern trong MongoDB là gì?

Read concern quyết định mức consistency/visibility của reads. Write concern quyết định mức acknowledgement/durability của writes, ví dụ majority yêu cầu đa số replica xác nhận.

Trade-off: concern càng mạnh thì consistency/durability tốt hơn nhưng latency có thể cao hơn. Với dữ liệu quan trọng như payment/order, thường cần write concern majority; với analytics/event không critical, có thể chọn nhẹ hơn tùy rủi ro.

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

Mở danh sách MongoDB