Alex  Voloshyn

Alex Voloshyn


Azure Cosmos DB Tutorial | Globally distributed NoSQL database

Azure Cosmos DB is globally distributed and highly responsive database in the cloud. With just few clicks you can get multi-regional distribution and redundancy with high availability of 99.999%.

In this episode I will cover basics of Cosmos DB with live demo of Portal Features and dotnet programming, but I also will explain most important features of Cosmos DB.



#azure #nosql

What is GEEK

Buddha Community

Azure Cosmos DB Tutorial | Globally distributed NoSQL database
Eric  Bukenya

Eric Bukenya


Learn NoSQL in Azure: Diving Deeper into Azure Cosmos DB

This article is a part of the series – Learn NoSQL in Azure where we explore Azure Cosmos DB as a part of the non-relational database system used widely for a variety of applications. Azure Cosmos DB is a part of Microsoft’s serverless databases on Azure which is highly scalable and distributed across all locations that run on Azure. It is offered as a platform as a service (PAAS) from Azure and you can develop databases that have a very high throughput and very low latency. Using Azure Cosmos DB, customers can replicate their data across multiple locations across the globe and also across multiple locations within the same region. This makes Cosmos DB a highly available database service with almost 99.999% availability for reads and writes for multi-region modes and almost 99.99% availability for single-region modes.

In this article, we will focus more on how Azure Cosmos DB works behind the scenes and how can you get started with it using the Azure Portal. We will also explore how Cosmos DB is priced and understand the pricing model in detail.

How Azure Cosmos DB works

As already mentioned, Azure Cosmos DB is a multi-modal NoSQL database service that is geographically distributed across multiple Azure locations. This helps customers to deploy the databases across multiple locations around the globe. This is beneficial as it helps to reduce the read latency when the users use the application.

As you can see in the figure above, Azure Cosmos DB is distributed across the globe. Let’s suppose you have a web application that is hosted in India. In that case, the NoSQL database in India will be considered as the master database for writes and all the other databases can be considered as a read replicas. Whenever new data is generated, it is written to the database in India first and then it is synchronized with the other databases.

Consistency Levels

While maintaining data over multiple regions, the most common challenge is the latency as when the data is made available to the other databases. For example, when data is written to the database in India, users from India will be able to see that data sooner than users from the US. This is due to the latency in synchronization between the two regions. In order to overcome this, there are a few modes that customers can choose from and define how often or how soon they want their data to be made available in the other regions. Azure Cosmos DB offers five levels of consistency which are as follows:

  • Strong
  • Bounded staleness
  • Session
  • Consistent prefix
  • Eventual

In most common NoSQL databases, there are only two levels – Strong and EventualStrong being the most consistent level while Eventual is the least. However, as we move from Strong to Eventual, consistency decreases but availability and throughput increase. This is a trade-off that customers need to decide based on the criticality of their applications. If you want to read in more detail about the consistency levels, the official guide from Microsoft is the easiest to understand. You can refer to it here.

Azure Cosmos DB Pricing Model

Now that we have some idea about working with the NoSQL database – Azure Cosmos DB on Azure, let us try to understand how the database is priced. In order to work with any cloud-based services, it is essential that you have a sound knowledge of how the services are charged, otherwise, you might end up paying something much higher than your expectations.

If you browse to the pricing page of Azure Cosmos DB, you can see that there are two modes in which the database services are billed.

  • Database Operations – Whenever you execute or run queries against your NoSQL database, there are some resources being used. Azure terms these usages in terms of Request Units or RU. The amount of RU consumed per second is aggregated and billed
  • Consumed Storage – As you start storing data in your database, it will take up some space in order to store that data. This storage is billed per the standard SSD-based storage across any Azure locations globally

Let’s learn about this in more detail.

#azure #azure cosmos db #nosql #azure #nosql in azure #azure cosmos db

Mikel  Okuneva

Mikel Okuneva


Build Fault Tolerant Applications With Cassandra API for Azure Cosmos DB

Azure Cosmos DB is a resource governed system that allows you to execute a certain number of operations per second based on the provisioned throughput you have configured. If clients exceed that limit and consume more request units than what was provisioned, it leads to rate limiting of subsequent requests and exceptions being thrown — they are also referred to as 429 errors.

With the help of a practical example, I’ll demonstrate how to incorporate fault-tolerance in your Go applications by handling and retrying operations affected by these rate limiting errors. To help you follow along, the sample application code for this blog is available on GitHub — it uses the gocql driver for Apache Cassandra.

#database #tutorial #nosql #azure #cassandra #azure cosmos db

Learn NoSQL in Azure: An overview of Azure Cosmos DB

In this article, we are going to learn Azure Cosmos DB. This article is a part of the series “Learn NoSQL in Azure”, where we will explore all the different types of non-relational databases that are supported in Azure at the moment. Azure is one of the most popular public cloud platforms that has a big market share all over the world. Cosmos DB is a part of the Databases section in Azure that allows customers to create and use NoSQL or non-relational databases and consume these at scale. You can leverage Cosmos DB to build highly scalable and robust cloud-based applications that support modern big data workloads. Let us understand more about what a NoSQL database is all about and how it is different from a relational database. Although this article focuses on the NoSQL related to Azure, it is to be known that other open-source projects support NoSQL databases like Apache Cassandra, etc. However, these topics are out of the scope of this article and we will focus on Azure mostly.

Why do we need a NoSQL Database?

Overall these decades, developers have been using relational database management systems to develop applications across all domains. Even today, relational databases are used heavily in most modern applications. However, as the applications and databases grew in size, it became difficult for the relational databases to scale and the need for highly scalable databases grew. Applications needed to be highly responsive and available most of the time. Due to these requirements, databases had to be scaled and distributed to achieve high performance and low latency.

However, relational databases were based on relationships, and distributing these databases across multiple systems gets very costly, as these relationships had to be maintained across all the nodes within the cluster. These databases are originally architected to run on single servers in order to maintain the integrity of the databases. This meant that relational databases can be scaled vertically but preferably not horizontally. Vertical scaling could be done by increasing the resources available on the server, but it was limited, unlike horizontal scaling. These limitations gave rise to the evolution of the NoSQL databases as these could be scaled both vertically and horizontally without having to worry about keeping relationships intact.

Introduction to NoSQL Databases

As the name suggests, a NoSQL database is basically a non-relational database. It is different from the fact that data in a NoSQL database is stored in documents as opposed to tables in relational database management systems (RDBMS). Since there are no tables in the database, there aren’t any relationships between the different entities within the database. There are many types of NoSQL databases like Key-Value databases, Columnar Databases, Document Database, Graph Databases, etc. The main form of storage in a NoSQL database is JSON. Let us look at how a NoSQL Database looks like.

As you can see in Figure 1, on the left we have two relational tables – “Orders” and “OrderDetails”. And on the right, we have a JSON document that relates to the structure from the tables. This JSON document is known as a single document in a Document Database. The detailed data from the OrderDetails have been incorporated within the same Orders in a nested form. This is a denormalized form of the data and helps in faster reads as compared to reading data from multiple tables. Here, in a NoSQL database, the data is stored in the form of documents, which means we are going to have one single document for each order. In this way, as the orders increase, they can be distributed to multiple nodes and scaled out accordingly. Notice that since the detailed data are nested within the same document, there is no need to maintain complex relationships within the two entities.

#azure #azure cosmos db #nosql

Kole  Haag

Kole Haag


What is NoSQL and How is it Utilized?

Posted on September 25, 2020 by Dean Conally | Updated: October 8, 2020

Category: Tutorials | Tags: CassandraColumnsDatabaseDatabase ManagementDatabase StructureDB2Document StoresDynamic SchemaExtensible Record StoresGraph StoresJSONKey-ValueMSSQLMulti-RowMySQLNodeNode Relationship NodeNon-Relational DatabasesNoSQLNoSQL ModelQueryRowsScalabilitySchema FreeSQLStoresTablesWide-Column

Reading Time: 5 minutes

What is NoSQL?

A NoSQL or a NoSQL Database is a term used when referring to a “non SQL” or “not only SQL” database. NoSQL databases store data in a different format than a traditional relational database management systems. This is why NoSQL is often associated with the term “non-relational” database. Simply put, NoSQL databases are modern databases with high flexibility, blazing performance, and built for scalability. These databases are used when you require low latency and high extensibility while working with large data structures. The versatility of NoSQL is due to the nature of as being unrestricted in comparison to relational databases models such as MySQL or DB2.

SQL vs. NoSQL Comparison

There are multiple differences between SQL and NoSQL database types. In the table below, we will compare some of the most critical variations.

#tutorials #cassandra #columns #database #database management #database structure #db2 #document stores #dynamic schema #extensible record stores #graph stores #json #key-value #mssql #multi-row #mysql #node #node relationship node #non-relational databases #nosql #nosql model #query #rows #scalability #schema free #sql #stores #tables #wide-column

Alex  Voloshyn

Alex Voloshyn


Azure Cosmos DB Tutorial | Globally distributed NoSQL database

Azure Cosmos DB is globally distributed and highly responsive database in the cloud. With just few clicks you can get multi-regional distribution and redundancy with high availability of 99.999%.

In this episode I will cover basics of Cosmos DB with live demo of Portal Features and dotnet programming, but I also will explain most important features of Cosmos DB.



#azure #nosql