MongoDB has always had single-document atomicity — any write to a single document is atomic regardless of how many fields or embedded arrays change. Multi-document ACID transactions were added in v4.0 for replica sets and v4.2 for sharded clusters.
MongoDB's recommended design philosophy is to model data to avoid transactions through embedding. Transactions are needed when business logic genuinely requires atomic updates across multiple documents that cannot be re-modeled into a single document.
When Transactions Are Needed
- Bank transfer: debit account A AND credit account B — both must succeed or neither
- Create order AND decrement inventory in one atomic operation
- Update multiple collections that must stay consistent (order + cart + reservation)
When Transactions Are NOT Needed
- Updating a single document (always atomic — no transaction overhead)
- Data co-located in one document (order + embedded line items)
- Read-only operations