Azure Cosmos DB.
What is it?
Why do you want to use it?
And how are you going to make it work for you?
I've got all the answers coming up now.
Hello, everybody.
My name is Adam Gordon, edutainer here at ITProTV,
back with another exciting ‘What Is Azure?’ serial episode.
In this episode, we're going to answer our famous questions.
What is the Azure service that we're focusing on?
In this case, Azure Cosmos DB.
Why is it important, why do you want to use it?
And ultimately, “How can you set up and deploy it?”
We're going to begin by talking about,
‘What Is Azure Cosmos DB?’
Most of you have probably come across a database
as you've been working with information,
whether it is an Excel spreadsheet, which believe it or not,
can be a type of database linking information
across different tabs in the Excel spreadsheet.
Similar concept to a database,
although it's much smaller, and self-contained.
You might have certainly come across something
like Microsoft Access,
slightly bigger version of databases, relational in nature,
having a design associated with how we use,
define and ultimately query data,
probably one of the most common databases
that most of us start out finding out about.
And maybe the really big version of that at scale,
Microsoft SQL, the large enterprise-scale database that again,
most of us probably come across at some point
when we're working or interacting with information.
But the reality is all databases are not created equal.
The Azure Cosmos DB database is all about scale, massive scale.
Imagine taking that Microsoft Access or Microsoft SQL database,
and stretching it as far as you possibly can,
and then stretching it even more and even more,
wrapping it around the entire Earth.
And then imagine that you can put
so much information into that database,
the biggest number you can imagine,
multiply that by the biggest number,
and then take that number and multiply it by that number again,
and you'd still have room left over.
That's what Azure Cosmos DB represents.
Massive data management at scale in the cloud
with guaranteed uptime.
Microsoft takes away all the complexity from us,
and allows us as customers, our users of the database,
to be able to quickly connect to one or more elements that use it,
and then see those elements at scale, anywhere in the world.
But it does so with 99.999% uptime. Five, nine uptime.
Massive amounts of availability, at scale globally,
multiple regions anywhere in the world,
and does so not using traditional database models.
The model we think about as a relational database with tables,
the access the SQL database I discussed,
but rather, allows us to be able to do this using no SQL database.
The idea behind it is we don't have the schemas,
the data definitions that are complex.
We don't have to worry about the relationships and the tables
and maintaining and grooming all that data.
All the complexity goes away.
It's available to us.
Microsoft manages it.
And as a result of that,
we have a lot more flexibility to use large amounts of data,
and to do so anywhere in the world, and also securely.
So when we think about what Azure Cosmos DB is,
it checks off all those boxes for us.
Let's talk about why it's important to us for just a moment.
When we think about our users over here,
for instance, and the fact that they need to be able to connect
to this data that we're storing in the Azure Cosmos DB,
they want to be able to do that,
connect to it, consume it, interact with it,
in order to understand the value of that data,
and tell compelling stories, maybe to stakeholders,
to business decision-makers, maybe as a customer,
they just want to understand more about their information,
their order, and their experience with your company.
So let's take that journey with them
and understand why this is important.
The App Users are going to be outside of Azure
somewhere off on the internet,
and they're going to come through our Azure Traffic Manager
interact with our web front end.
Imagine this is you trying to get something
and buy something from a web page
using that particular e-commerce functionality.
We're all familiar with that, the Amazon model of the world.
And so our journey begins by bringing those users
and their traffic through a Traffic Management device.
Think of it as a gateway that routes traffic
and sends it to the easiest and most available
and most readily usable portion of that application
and that traffic winds up here.
And then those users and that traffic have to make
this journey over to the Azure Cosmos DB to the database
to interact, make that order, ask a question,
and understand how to get that information back.
This application sends this data over
to any one of several regions
where this data is maintained by Microsoft on our behalf,
and does so quickly at scale seamlessly.
So as the customer, I don't have to worry about it as the user,
I don't have to worry about it.
Microsoft does all this for us.
We like the simplicity, and the ease of use.
These regions are interconnected,
they communicate with each other
and we can kind of draw a line around these
to represent the fact they're all part of the same group.
If I connect in Region B,
it's the same as if I connect in Region A or C.
My data is going to be available.
I'm going to be able to access it as a customer.
I'm going to be able to interact with it,
get the answers that I need.
And finally, we can do this securely using Azure Key Vault
to maintain the integrity and the confidentiality of our data.
We can look users up in the Azure Active Directory,
understanding that we can validate who they are
and what they're there to do.
And we can get Azure App Insights as part of the solution,
telling us in performance wise explaining to us as the customer
exactly how well we're doing
and taking care of these users requests,
how quickly, how thoroughly, and as a result of that,
can we make changes and optimize that if necessary.
All of this is going to be able to be brought to bear
to make this experience for our users the best one possible.
That's really the main reason
why we want to be able to use Azure Cosmos DB.
How we're going to do that, it's going to require me to go
and show you how we can deploy this.
And you're going to join me for that coming up now.
So we're going to talk about
how we can actually deploy an Azure Cosmos DB Instance.
We're in the Azure portal.
I'm going to zoom in in just a second to show you where we are.
We're using our navigation quick picklist.
I'm going to choose the Azure Cosmos DB option.
You'll see the pop-out card.
They're showing us what it is.
If you don't see Azure Cosmos DB in this list, you can add and remove elements.
So it may look different for you when you go to take a look.
Let's just zoom in real quick so you can see that up close.
You can use the All Services and Dashboard elements
up above to search.
You can actually also come right up here,
use Create a Resource or use the search bar
and type in Azure Cosmos DB in order to find it.
So it's really easy to get to.
We're going to click on it.
We're going to bring up the Azure Cosmos DB area
where we would see any and all of the active instances.
Notice there's nothing there right now,
but what we're going to do is come over here.
We're going to choose our Add option
and we're going to begin to use the wizard
in order to create this instance.
So we'll click there.
We'll give it just a second.
We're going to have several different things
we have to provide information for.
Think of them as questions you have to answer on several tabs.
We're not going to walk through all of them.
I'm going to stop for a moment here in there,
call out a couple of things that are of interest to you.
If you want to see a full walkthrough
and understand all of the options you have
and the understanding is really important
to make good decisions, you can join me over at ITProTV,
where we discuss all of the Azure services
and the ways to deploy them in more depth.
And you could see all the different kinds of training
we have available.
I actually talked about Azure Cosmos DB
in a couple of different courses there
and you could certainly take advantage of that if you choose to.
All right. Let's jump in.
Let's take a look at the basics.
So what we're going to do is to scroll down for just a moment.
The first thing we need to do is pick a place
where we want our Azure Cosmos DB Instance to live.
We call that a Resource Group.
Think of it as a container, where we can put all of our stuff
and it's uniquely dedicated to that particular amount of stuff,
whatever we're collecting and using.
I'm going to use a preexisting one by pulling down that list
and choosing one I've already created.
But I can also create a new one right from here if I choose to.
So I'm going to use the Cosmos DB resource group
that I've already created.
And then we have to specify our Instance Details.
And in the instance details area,
we need to give our instance the Azure Cosmos DB installation.
We're about to create a name.
I'm going to call that my courtneycdb.
Courtney is the name of our producer who's
behind the camera for us on this episode.
Hi, Courtney.
And we're going to go ahead and choose our API.
Our API is going to be, as you can see,
our list of all the different models
and ways in which we can deploy Azure Cosmos DB.
We can use it with Mongo DB, Cassandra,
all sorts of different options really driven
by the business need that you're going to address.
I can choose any one of these,
and depending on which one I choose,
I have slightly different options.
You'll see Azure Cosmos DB for Mongo
changes some of the things I have to provide.
If I choose Core SQL, some of the things change.
So we'll use Core SQL, but you make the appropriate choice.
And then down below, I've got some options here
about whether or not I want a certain kind
of account production, non-production,
whether I want to have those geo-redundancy capabilities
I showed you on the lightboard,
those different regions where I can have
these instances of Cosmos DB running
to give me that global availability.
So we make our choices here as necessary.
And then what we want to do is go to our Networking area.
We want to be able to choose what kind of network connections
we want to make available for working with
the Azure Cosmos DB Instance.
Do I want to have public IP addresses
that are available to people outside,
as we saw in our diagram on the lightboard can connect in?
Do I want only private networks available for me,
for users inside the Azure Cloud inside our corporation,
but not external, or don't want to blend.
I make different choices, again, depending on the reasons
why I'm deploying this and how I want to use it.
We'll leave our default in place.
We're going to take a look at our Backup Policy.
This allows us to make sure that we have the information
that's in our database, or in the instances of the database,
all backed up, copied, safe, secure.
If anything were to go wrong, we had to restore it,
we can go to that backup,
and we can have Microsoft restore that information for us.
So we make some choices here again, as needed.
And then what we want to do
is want to go over to our Encryption area.
The last major area we want to focus on.
And for encryption, we have to make a very important choice,
whether we as the customer,
the person who's going to ultimately own,
or the organization that's ultimately going
to own this instance of Azure Cosmos DB,
do we want Microsoft to manage encryption
and secure keys for encryption on our behalf.
Service-managed key gives us that option.
Again, remember Microsoft is managing everything already.
We want to probably let them do that part as well,
but if we have a need to use Customer-managed keys,
we can choose that, and then we actually decide
what kind of keys we're going to use,
how big they're going to be, how long they stick around,
and most importantly, how we're going to store them securely
using the Azure Key Vault.
And you can check out our episode
on the Azure Key Vault in the ‘What Is Azure?’ serial
if you want to learn more about that service as well.
So we make our choices here.
Once we're done, we click through our last area,
Tags or metadata.
You can use them or not.
We click ‘Review and Create’.
Once we get our validation success telling us we're ready to go,
we would go ahead
and we would choose Create right down here at the bottom.
It will take several minutes to create the instance,
so be patient with it while you're waiting.
Again, if you want to see how this is done end to end,
you can check me out over an ITProTV
and all of the other edutainers that talk about Azure,
showing you all the different ways
in which you can use Azure services
most efficiently across your organization.
I'll be back with more episodes in our ‘What Is Azure?’ serial,
but until I have another cool feature to talk about with you,
I'll wish you happy Azuring, and I'll see you soon.