LK-MUG is a Microsoft recognized user community established in Letterkenny, Donegal, Ireland under the full name “Letterkenny DotNet Azure User Group”. We are currently being operated with support of .NET foundation and Microsoft. This community is for everyone interested in Microsoft .NET, Office-365, SharePoint, Azure cloud platform and other Microsoft Open Source initiatives.

All skill levels are welcome.

We are committed to helping you learn and share things about .Net, Office-365, SharePoint and Azure Cloud.

Our community brings all students, enthusiasts, experts and professionals working in and around Donegal county in Ireland.

Time to time we will be seeing events organized by Microsoft and MVPs to provide best-in-class learning experience for Microsoft Technology enthusiasts.

TTL capability within Azure Cosmos DB is a live saver, as it would take necessary steps to purge redudent data based on the configurations you may.

Let us think in terms of an Industrial IoT scenario, devices can produce vast amounts of telemetry information, logs and user session information that is only useful until we operate on them and take action on them, to be specific up to finate period of time. Once that data becomes surplus, we need an application logic that purges these old records.

With the “Time to Live” or TTL, Microsoft Cosmos DB provides an ability to have your documents automatically purged from database storage after a certian period if time(which you configured)

This TTL by default can be set on a document collection level and later can be overridden on a per document basis.

Once the TTL is set, Cosmos DB service will automatically remove the documents when its lifetime is over.

Inorder to track TTL, Cosmos DB uses an offset field to check when it was last modified. This field is identifiable as “_ts”, which exists in every document you create. Basically it is a UNIX epoch timestamp. This field is updated everytime when the document is modified. [Ref: Picture1]

[Picture1]

Enabling TTL on Cosmos DB Collection:

You can enable TTL on a Cosmos DB collection simply by using Azure Portal –> Cosmos DB collection setting for existing or during creation of a new collection)

During the Ignite 2018, Microsoft has announced the general availability of Multi-Master feature being introduced to Azure Cosmos DB to provide more control into data redundancy and elastic scalability for your data from different regions with multiple writes and read instances.

What is Multi-Master essentially?

Multi-master is a capability that provided as part of Cosmos DB, that would provide you multiple write regions and provides an option to handle conflict resolution automatically through different options provided by the platform. Most of the major scenarios you would encounter the conflict can be resolved with these simple configurations.

Azure Cosmos DB multi-master configuration is the game changes that really makes it a true global scale database with automatic conflict resolution capabilities for data synchronization and consistancy.

In my later sessions I will write examples to cover how conflict resolutions can be configured and used in realtime scenarios.

Azure Cosmos DB is a planet scale global document database which have been available for Azure Customers based on pay-as-you-go. Reserved Capacity is a new long term pre-paid billing commitment customers can get a discounted pricing. Azure Cosmos DB reserved capacity helps you save money by pre-paying for Azure Cosmos DB resources for a period of one year or three years.

Reserve capacity allows you to get a optimum discount for the throughput(RUs) provisioned for Cosmos DB resources.

For Ex: Databases and Containers (tables/collections/graphs).

It can significantly reduce your Cosmos DB costs and it enables you to save up to 65 percent on regular prices with one-year or three-year upfront commitment.

Reserved capacity provides a billing discount and does not affect the runtime state of your Cosmos DB resources.

It is available to all supported APIs (including MongoDB, Cassandra, SQL, Gremlin and Azure Tables) and all regions worldwide.

Scope of Reservation:

A reservation is scoped to a single subscription or shared across all your enrolment:

Scoped to a Single Subscription: that means a set of cosmos db account resources such as database or containers within the selected subscription.

Shared/Scoped to an enrolment: Billing benefit can be shared across any subscription in the enterprise agreement or pay-as-you-go subscriptions.

Who can opt-in for Reserved Capacity?

This feature is currently only applicable for enrolment (Enterprise Agreement customers) or account (Pay-as-you-go customers). Users with MSDN Subscription benefits are not applicable for the Reserved Capacity benefits.

“In learning you will teach, and in teaching you will learn.” -Phil Collins

About

Nithin Mohan – A passionate hardcore application programmer, software architect, and technology evangelist with over 13 years of experience in Web, Mobile, and Cloud applications design and development.
A hardware geek, a kick-starter, and a quick learner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. This blog is to share knowledge, tips & tricks on software development using Emerging Technologies. Thanks to the readers and sincere thanks to all author's of crossposted blogs. Blog is powered by theme gitsta, customized for this blog. Enjoy reading the blog and subscribe to the RSS feed.