Magento 2 MongoDB Integration : As we are the largest supplier of Marketplaces and Multichannel ingratiation. There is always a topic of discussion about choosing right tools.
Or they should start from Magento 2 MongoDB Integration ?
Before reaching the conclusion I would like to ask a couple of questions. First and foremost important one is
There are a couple of answers to this questions. Sometimes customers say it scales well and you can shard the data easily.
Source : https://docs.mongodb.com/manual/sharding/
Also, replication is something super scalable and easy to manage, unlike MySQL. You can easily add more and more cluster for slaves.
There are a lot of other advantages of MongoDB over mysql. I totally agree with that.
But But But do I need to replace the Magento 2 RDBS (MYSQL) with MongoDB? Well, I would suggest big NO.
Indeed and this is very true. You must not use anything in your e-commerce store randomly. You must investigate where the problem is?
Even I was quite stunned customers having less than 100 customers concurrently and they are blaming Magento or mysql for slow performance.
For sure MongoDB will not be useful for this case.
MongoDB has brilliant use case on their website – https://docs.mongodb.com/ecosystem/use-cases/
And I would recommend everyone to check that out. Specially product catalog model part – https://docs.mongodb.com/ecosystem/use-cases/product-catalog/
Even I am a great supporter of MongoDB for product catalog part when you have loads of 1000+ variants and combinations in every product.
But not as a replacement. Magento 2 works really well with existing tools. They have optimized a lot. Example – MVVM approach for the shopping cart.
In any Ecommerce system product model is not everything. Obviously you have other entities as well – Orders and customers and as per my knowledge there is no replacement for that in magento 2 at the moment.
Even recently we got the news for “MongoDB gets support for multi-document ACID transactions” – https://techcrunch.com/2018/02/15/mongodb-gets-support-for-multi-document-acid-transactions/
Which will be for sure a plus for any commerce system built on MongoDB.
Also I hope Magento team will release more database driver support in future.
There are thousands of options to scale your e-commerce marketplace or shop with the existing setup. Replacing MySQL with MySQL is not the only option. There are plenty of work around.
If that is the case. You must think not for the today but for the future updates, templates, and 3rd party plugins as well.
For sure it will be hard and on every update again you need to update everything and for sure that will be a mammoth task.
But against all odds, if you want to use MongoDB, you should use it for product catalog model. And you must create a kind of adapter between Magento 2 and MongoDB in this way you should not alter any code at Magento end.
You can easily create the product API and manage the product catalog model at MongoDB end.
Again my conclusion is you must investigate why you need NoSQL with Magento 2? because I am 100% sure there are tons of options for the same.
But if you are doing so go with more like a micro-services kind of architecture. And use the mysql+nosql together. In this way, you will get the complete boost.
Please let me know if you have any further doubts.