0

I'm designing a data model for a transactional use case which is write intensive. The write load would be 900 - 1,600 Transactions Per Second (TPS) which would account for 30 million Inserts/Updates per day and read load would be 600 - 800 TPS

Since we have opted for an embedded data model, we are using upsert queries in most places. We have unique indexes built on the right fields to make the search faster. Out of the 30 million TPS day, we will be performing at least 10 million upsert per day

I would like to know:

  1. Is it wise to keep the documents embedded and perform upserts every time (considering the load) rather than keeping the documents in 2 separate collections and perform joins to report the data to client applications?

  2. Considering the load, I suspect that too much of upsert would created high IO and crash the system.

Anban
  • 36
  • 2
  • Possible duplicate of [MongoDB: Update/Upsert vs Insert](https://stackoverflow.com/questions/35112836/mongodb-update-upsert-vs-insert) – Naing Lin Aung May 28 '19 at 03:24
  • @NaingLinAung I would like to know: Is it wise to keep the documents embedded and perform upserts every time (considering the load) rather than keeping the documents in 2 separate collections and perform joins to report the data to client applications? Considering the load, I suspect that too much of upsert would created high IO and crash the system. – Anban May 28 '19 at 07:36
  • This is too broad. You need to test out various approaches with your specific data and update patterns. – JohnnyHK May 29 '19 at 00:58

0 Answers0