Announced at Build: new options to build and test apps at any scale

Aria Jelinek

Aria

Today at Microsoft Build 2021, we are announcing updates that make it easier than ever to build applications of any scale on Azure Cosmos DB.

For developers building apps with spiky and often-idle traffic, serverless for all APIs (Core SQL, API for MongoDB, Cassandra, Gremlin and Table) is now generally available. Serverless has no minimum monthly cost and does not require you to estimate throughput in advance, so it is a great fit for apps with sporadic traffic patterns. To configure, just toggle the capacity mode setting to “serverless” when creating a new Azure Cosmos DB account. For more details including when to use serverless vs. provisioned throughput, check out this blog post.

For developers whose workloads are better suited for the traditional provisioned throughput model, we are also introducing expanded throughput and storage on the Azure Cosmos DB free tier. With 1,000 request units per second (up from 400) and 25 GB storage (up from 5 GB) free each month, you now have more flexibility to spin up a hobby application, learn Azure Cosmos DB for free or simply get a discount on one Azure Cosmos DB account per Azure subscription. Remember to toggle “Apply free tier discount” to “Apply” when creating your account; increased quantities will automatically apply to existing free tier accounts.

Finally, we are excited to announce a new opportunity for Linux and macOS developers to build, test and learn on Azure Cosmos DB for free with or without an Azure subscription: the Linux emulator, now in preview for the Core (SQL) API. See below for more details on how to get started today.

Note: This is one of two posts on Azure Cosmos DB updates at Build 2021. For details on new options for enhanced control, security, cost savings and speed, check out our blog post here.

 

Spotlight on the NEW Linux emulator:

The Azure Cosmos DB local emulator makes it possible to develop on your Linux or macOS machine for free. It is also available for Windows developers.

To install and configure the Azure Cosmos DB Linux emulator:
  1. Download Docker Desktop for macOS or Linux
  2. Next, retrieve the IP address of your local machine. This step is required when Direct mode setting is configured using Azure Cosmos DB SDKs (.NET, Java).
ipaddr="`ifconfig | grep "inet " | grep -Fv 127.0.0.1 | 
awk '{print $2}' | head -n 1`"
  1. Pull the Docker image from the registry.
docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
  1. Run the Docker image with the following configurations (note: remove all line breaks when running this command):
docker run -p 8081:8081 -p 10251:10251 -p 10252:10252 
-p 10253:10253 -p 10254:10254 -m 3g --cpus=2.0 --name=test-linux-emulator 
-e AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10
-e AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true
-e AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=$ipaddr
-it mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator

For details on how to manually trust the self-signed certificate of the emulator and access the emulator’s UI, please follow this documentation.

  1. Once you have set up the emulator, you will be able to test and develop locally!

When you are satisfied with your application in the emulator, update the Azure Cosmos DB connection endpoint to deploy to an Azure Cosmos DB account in the cloud.

Interface of Linux emulator

For more information on all Azure Cosmos DB updates:

New to Azure Cosmos DB?

 

0 comments

Leave a comment