I’ve kept you informed over the years about not just the latest news and features in SQL Server, but across the entire Microsoft Data Platform, both on-premise and in the cloud. This includes additional products such as SQL Server Analysis Services (SSAS), SQL Server Integration Services (SSIS), and their cloud siblings, Azure Synapse Analytics, and Azure Data Factory (ADF). Another important and powerful sibling product is Azure Cosmos DB, previously known as Document DB, which I first wrote about here many years ago.
What Is Cosmos DB?
Azure Cosmos DB is a global NoSQL data management system that offers fast read and write speeds with automatic scaling, high availability, and a very flexible set of options for consistency, availability, and “partitionability.” While Cosmos DB is its own data management platform, you can use it to emulate or even directly substitute for popular NoSQL alternatives such as MongoDB or Cassandra. Cosmos DB also provides a variety of data models for storing data and APIs so that you can access your data as if it were SQL, Cassandra, MongoDB, Gremlin, Spark, etcd, or Table (of the wide-column family popularized by Cassandra and HBase).
I like how my colleague and fellow DBTA writer, Guy Harrison, describes Cosmos DB (https://bit.ly/2WdCWTn):
“At the heart of Cosmos DB is a geo-distributed and replicated database. Data is stored in containers that can be partitioned across regions. The partitioning can be adjusted dynamically by the system to optimize throughput. The partitioning can also be tuned to provide geographic optimization: Data specific to Europe can be located primarily in European data centers, for instance. Cosmos DB offers uniquely configurable options across consistency models, data models, and APIs.”
New Features Every Month
Like many of Microsoft’s Azure products, Cosmos DB has a rapid release calendar with lots of new features and capabilities releasing at a regular cadence. For example, in January, the team released new APIs to support MongoDB server version 3.6, as well as a new Autopilot feature (in preview) to automatically manage and elastically scale the request units (RUs) consumed by your instance of Cosmos DB. And in February, the team rolled out the new SDK 2.2.2 release of the SQL API that supports Spring Data, also incorporating new diagnostic information, such as the RequestCharge API with better handling for user requests (https://bit.ly/3cVkQuY).
Announcing the New Free Tier for Azure Cosmos DB
The new free tier for Azure Cosmos DB offers new accounts 400 RUs and 5GB of storage free each month. This amounts to about $25/month in free services. If you’ve built apps on Cosmos DB that run on less than 400 RUs and 5GB of storage, then you won’t have to pay anything. Conversely, however, if you know your application will exceed that usage, then you get to apply the discount once you consume more than those resources.
For users who need lots of collections, up to 25, you will now be able to run those in a shared throughput dataset where they all share the free 400 RUs/month so apps that previously would have cost a bunch of RUs can now run for free with the new free tier. Just because this offering is “free” doesn’t reduce its value to you. The free tier still includes the same 99.99% availability and the same <10ms read/write latency normal to all Cosmos DB accounts. However, Microsoft does not offer an SLA on the free tier of resources consumed. You can have up to one free tier per Azure Cosmos DB account per Azure subscription.
Please note that if you create a database or container that’s replicated in multiple regions, then the amount of RUs consumed is multiplied by the number of regions. So if you have a three-region Cosmos DB database and you use 150 RUs in a month, that will actually total up to 450 RUs across all three regions, thus exceeding the free tier limits. However, you would receive a bill for only 50 RUs (450 RUs used – 400 RUs free = 50 RUs billed).
Start by creating a new Azure Cosmos DB account (https://aka.ms/create-cosmos-account) and then activate the free tier (https://aka.ms/cosmos-free-tier) during account creation. Remember that you are limited to one free tier account per Azure subscription. Check out the Microsoft quickstarts
and tutorials (https://docs.microsoft.com/azure/cosmos-db) for traditional lessons. Or try out a sample Azure Notebook (https://docs.microsoft.com/azure/cosmos-db/create-notebook-visualize-data) to see what you can do with Azure Cosmos DB right away.