Azure Cosmos DB is Microsofts globally distributed, multi-model database. With the click of a button, Azure Cosmos DB enables you to elastically and independently scale throughput and storage across any number of Azure's geographic regions.
Creating a new Azure Cosmos DB instance
If you have an Azure account already, just navigate to the Cosmos DB section and start creating your new Cosmos DB instance.
Make sure that you select MongoDB in the API select dropdown. Then select the region that suits your needs, e.g. choose North Europe. Click the "Create" button and a new Cosmos DB instance will be provisioned for your account. The database instance is now ready for external connections and data traffic.
Connect your restdb.io database to Azure Cosmos DB
Copy the connection string from Cosmos DB into your RestDB account.
Navigate to the "Manage" tab in the settings of your restdb database and paste the connection string from your Cosmos DB into the "External MongoDB connection" text area.
Note that, for some reason, unless you "pre-create" the collections you need in the CosmosDB admin, you might get error messages displayed in the restdb.io admin UI. Typical error that show up is: The index path corresponding to the specified order-by item is excluded / The order by query does not have a corresponding composite index that it can be served from. Read more in the Azure CosmosDB Documentation.
Create some test data
To make sure that we have a valid connection to our Cosmos DB we've used the random data generator to create some random data in the contacts collection.
If we navigate to the Azure Cosmos DB Data explorer view we will see the same data stored in our Cosmos DB instance. You can now use the restdb.io UI to manage these data and the REST API for programmatic access.
Azure lets you protect your database API in various ways. Add a secure firewall or even a virtual private network, it's all there.
Azure Cosmos DB is an enterprise grade database engine which delivers unprecedented scale and flexibility. Together with restdb.io's secure REST APIs and the user friendly data admin client, you have a powerful combination for rapid and effortless serverless development.