What Does MongoDB-As-A-Service on Azure Mean For Sitecore PaaS?
Does This NoSQL Need A Sequel?
Let's take a look at recent changes with DocumentDB that allows us to use the MongoDB API-as-a-service on Azure as part of a Sitecore Azure PaaS deployment.
MongoDB on Azure was (and arguably still is) a bit of a dark art. We could spin up a platform-as-a-service version of Sitecore from the Azure Marketplace but we'd always have to provision on MongoDB instance separately. Take your pick of managed MongoDB providers - MongoDB Atlas or mLab for instance - and enter their connection strings as part of your Sitecore Azure PaaS setup.
But MongoDB is a part of Sitecore XP, and having to spin this up separately undermines the platform-as-a-service promise just a wee bit. I'm not mad about it. It's all love. Sitecore PaaS is exciting and beautiful.
Introducing MongoDB-As-A-Service on Microsoft Azure
In the Azure Marketplace Microsoft has released Database as a service for MongoDB. Here it is the marketplace.
The underlying technology behind this is Microsoft's blazing fast DocumentDB. Microsoft has introduced a MongoDB API layer to wrap DocumentDB, allowing for seamless use of MongoDB protocols.
If you search, you'll see bits of info from different states of the MongoDB API on Azure. But I have confirmation via email from the Andew Hoh of th DocumentDB team that as of March 2017 "DocumentDB with MongoDB APIs is officially GA (Generally Available)."
"General Availability" releases are touted with some fan fair as there is no RTM (Release to Manufacturer) release in Azure product lifecycles.
So from Microsoft's perspective it's ready to go.
What Does It Look Like?
To setup it up, it needs an ID, Resource Group and data center Location.
Once it's created, select Collections > Browse Select to Add Collection. Name it, size it and create a new or use and existing (MongoDB) database to put it under.
When you select Quick start you'll get an overview showing sample code and connection strings across various platforms (.NET, NodeJS, Python)
For usage with Sitecore, add the name of your collection after hostname and port within the provided MongoDB connection string.
So Can I Use This With Sitecore?
As of the publish date of this article, we're successfully using MongoDB API for DocumentDB in our Azure PaaS Sandbox.
But it is not officially supported by Sitecore. As to why, I don't have too much clarity. The MongoDB API has been "Generally Available" for less than 2 months as now, so it could just be moving too fast. I'd suspect it just prudence on Sitecore's part if the MongoDB API has truly been ported like for like.
What Does This Mean For The Future of Sitecore Azure PaaS?
With Azure Resource Management (ARM) templates allowing infrastructure to scripted and deployed on-demand, my hope is that this new MongoDB API for DocumentDB is incorporated as a part of the default Sitecore Azure PaaS deployment in the near future.
Of course there is no need to wait for Sitecore. An individual of certain caliber could incorporate this MongoDB service into existing Sitecore Azure ARM templates, no need to delay.
Regardless of when it happens, the new MongoDB API lays the foundation for 100% complete Sitecore Azure PaaS deployment in the near future.