Azure Cosmos DB - Part Two - Understanding The Azure Cosmos DB Concept

Azure
Microsoft started a project in 2010 called “Project Florence” in order to address the difficulties faced by the developers while developing the large scale applications inside Microsoft. The difficulties were so common across the developers inside and outside Microsoft that they decided to release this as a product in the form of Azure DocumentDB in 2015. Azure DocumentDB was immediately a hit with NoSQL developers who wanted to move to cloud and with document based database it was quite simple to adopt the new technology. After the success of DocumentDB, Microsoft decided to roll of Azure CosmosDB which is built on the same design of Azure Document DB and released as a superset of DocumentDb.

If you’re not familiar with the NoSQL and SQL differences, I urge you to go through my article first. I think Azure CosmosDB is one of the biggest announcements of the Build 2017 and it is one place service for all our NoSQL requirements. If you have not gone through my article on the NOSQL, I request you to go through it to understand Azure CosmosDB.

Azure CosmosDB gives the option to store the data in a KeyValue Pair, Column based database, and Document based database as well as the Graph Database. It right now supports Azure tables, MongoDb, SQL, and DocumentDb & Gremlin while writing this article. Microsoft indicated that they are going to be adding more service under this umbrella which is going to make it much more powerful. These capabilities are in the areas of the core database engine as well as global distribution, elastic scalability, and industry-leading, comprehensive SLAs.

For the existing DocumentDB customers, the transaction is going to be seamless. The DocumentDB Account is going to move under the CosmosDB account and all your collections and data will remain intact. Also, the same client SDKs will continue to work, and you don’t need to make any code changes in order to continue with the DocumentDB application.

Design Goals of Azure CosmosDB

  1. Elastic Scale
    One of the biggest advantages of using any service is elasticity to scale up and down as per need and Azure Cosmos Db is designed to support it. It will be able to deliver the Throughput within 5 seconds at the 99th percentile, from the time of scaling.

  2. Distributed Application
    In these few years, the type of applications we used to build have changed and now we are looking for globally distributed application which means in the database world is our data will be globally distributed across multiple regions. With this, there comes the bottle neck of consistency as syncing of data is a difficult task and making it consistent. CosmosDb has worked on this pain point and make the data “eventually consistent” which means the data is eventually going to be consistent and the Platform takes care of that you don’t need to handle those scenarios. Microsoft has already taken care of handling these things for you on your behalf by using some best practices.

  3. Responsive and Critical Application
    The system must deliver predictable and guaranteed end-to-end low read and write latencies at the 99th percentile.

  4. Always on Database
    In order to provide the 99.99% availability across multiple regions associated with their database. Azure CosmosDb gives you a failover mechanism out of the box that means if one region is down than the calls will automatically redirected to the other region and you can also mockup this scenario to test the failover-availability scenario.

  5. Economical
    Microsoft has make sure that the solution of Cosmos Db don’t dig a hole in the pocket of the customers. CosmosDb is very economical and we are going to discuss the pricing model later in this post.

  6. SchemaLess
    Maintaining and designing the schema is a pain point for all the developers so CosmosDB is designed on NoSQL which mean there will be no schema and developers can focus on the application logic instead.

  7. Support multiple languages and APIs
    It supports multiple APIs and languages. Microsoft has released SDKs for major programming languages like .NET, .NET Core, Node.js, Python, JavaScript and Java but also gives the MongoDb users ability to directly move the data by just changing an API connection string.

Pricing

The data is stored in an SSD and it's charged as $0.025 GB/Month. The throughput of the collection is billed per hour and charged at $5.952/Month (based on 744 hours per month). Minimum throughput required is 400, so the minimum cost of a CosmosDB account is going to be somewhere around ~$21 per month. Also, Gremlin is in Preview right now and it's free as of now.

Azure

Summary

Azure CosmosDB is a globally distributed, highly scalable, highly available, and fully managed one stop solution for NoSQL Customers. It supports REST based API calls and Microsoft has also built client side SDKs for .NET, .NET Core, Python, Node, JavaScript and Java. It supports Key Value, Column based MongoDB, SQL (DocumentDB), and Gremlin (GraphDB) as of now. Its pricing is economic and you can get started with as low as $21 per month as of writing this article.

Up Next
    Ebook Download
    View all
    Learn
    View all