Azure Cosmos DB provides a NoSQL database in Azure premises. It is globally distributed, highly available, massively scalable database. It is an extension of the previous DocumentDB which was used for storing databases.
Following are the Advantages of Cosmos DB.
Scalability It is horizontally scalable
Globally Distributed It is available from multiple edge server end points reducing latency
Multi-Model It supports document, key-value & graph models
Multi-API It supports sql, mongodb, cassandra, azure table, gremlin apis.
Security It is fully & transparently encrypted
Create Cosmos DB
Open Azure Portal > Search for Cosmos DB > Use Create Option as below.
Enter the details in appearing window.
You can access the same from Azure Cosmos DB tab from the left.
Clicking on the Quick Start pane will give you the Development Code & Samples.
In this post we can explore Azure Storage Account.
Azure Storage Account
Azure Storage Account is required to make use of the Storage features of Azure. Azure Storage provides following advantages:
· High Availability
Azure Storage Account allows us to create Table, Queue, File, Blob storages.
Create a Storage Account
Login to Azure Portal. Go to Dashboard. Click on Storage Accounts tab.
You can see the Default Storage Accounts as listed below.
For creating a new Storage Account click on the Add button from the top.
Click on the Create button & You can see the New Storage Account is created. You can click on the Storage Account to view the Unique URL.
Storage Account usage induces Usage charges. Hence wisely make your decision on storage, traffic, edge servers.
In this post we have explored Storage Account Creation.
Azure provides the popular Redis Cache service in all the service plans.
History of Redis Cache
Redis Cache is an Open Source caching framework. Its popularity among developers made Azure adapt it and available to Azure development platform.
Advatages of Redis Cache
Following are the advantages of Redis Cache:
- Highly Scalable Redis Cache can be horizontally scaled based on demand
- Low Latency Improved availability through edge servers makes low latency in calls
- Highly Secure Redis cache provides better security than traditional caches.
- Better Data Structure Redis Cache provides storage of cache as key-value pair as strings, hashes, lists, sets and sorted sets.
- Better Atomicity through Transactions feature
- Persistence Redis Cache allow persisting data into database.
Creating a Redis Cache
Open Azure Portal and choose Create a resource option. Search for Redis Cache and you will get the following option.
In the appearing window we can specify the cache name.
We can use Redis Cache in application as below:
// Open Connection
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect("YOURCACHENAME.redis.cache.windows.net, ssl=true,password=YOURPOASSWORD”);
IDatabase cache = connection.GetDatabase();
// Create Value
// Retrieve Value
string value = cache.StringGet("mykey");
You can get the Access Keys from the Azure Portal window.
In this post we have explored about Redis Cache.