I am running a cron whose code is written in golang, and i am using mongoDb as database There was 128GB Ram into my system in which DataBase is stored, and I am using different system for the code. The cron is running with 17000 merchants parallely, each merchant having different database, which means there was 17000 Db’s into system.
Now I will tell you the scenario, When the cron Runs, there are approximately 10000 write/insert operations per seconds, which makes mongodb slow and it affects the performance of the mongodb as well as the overall cron. The write operations include Bulk Insert queries as well as single Insertion and moreover these queries are being executed concurrently for different merchants.
To overcome this problem, I’m thinking to use Transactions for write operations, will it make an positive impact on the slow down of mongodb. Is there anything else which i can implement to improve the performance of mongoDb, that doesn’t slows it down and makes it faster than now.