Doubt about this line - "We establish a new connection with Cosmos DB and start a dual write to both databases while still reading from MongoDB."

How did you manage the inconsistency of data between mongo and cosmos in case data write failure in cosmos after it has been written in mongo.

I am assuming that since mongo was your main db so failure in write in mongo would be failing the case to write in cosmos.

Another question, is there any relevant article as to why did you choose document db for gaming leaderboard usecase.



Prateek Gupta

Lead Software Engineer from India. Fancy learning and building new stuff. Making a habit to share knowledge via blogs