CosmosDB vs. Azure SQL–Performance Benchmark

I was doing Benchmarking on CosmosDB vs Azure SQL for a Performance Critical application.  Our needs was fulfillable through Azure SQL but there was some CosmosDB use cases like Schemaless, Geo-replication etc.

So let us see the Performance Benchmark

Configurations

CosmosDB

  • Default Configuration
  • East US
  • SQL API

Azure SQL

  • Standard S1
  • East US

Test 1 : Accessing from Laptop

The Test 1 was conducted from a Laptop within US region.  The test was conducted with 100 continuous Inserts of 10KB data on each.

The observations are below.


100 Count 1 Count (Average)
CosmosDB 3 second 30 millisecond
Azure SQL 3 second 30 millisecond

Test 2  : Accessing from Azure VM

The Test 2 was conducted from an Azure VM within East US region to ensure minimum latency.  The test was conducted with 100 continuous Inserts of 10KB data on each.



100 Count 1 Count (Average)
CosmosDB 2 second 20 millisecond
Azure SQL 1 second 10 millisecond

Inference

Cannot find much speed advantage on Cosmos DB

SLA

As per the SLA on CosmosDB there need to be following criterias to get the 1 digit millisecond response:

  • Within same Region
  • TCP configuration
  • High Speed Internet

Summary

Azure SQL on Standard Configuration is providing better Speed than Cosmos DB.   Choose Cosmos DB based on the right use case.

I can publish the Database Benchmark Application on demand.

Azure Data Migration

In this article we can explore the Data Migration Assistant Tool of Microsoft. It helps in Migrating your Local SQL Server database to SQL Azure.

Data Migration Assistant

Data Migration Assistant is a Great Tool from Microsoft providing:

· Assessment checks on Compatibility of Source Database

· Actual Migration of Schema & Data

Download

You can download the tool from:

https://www.microsoft.com/en-us/download/details.aspx?id=53595

Running the Tool

After installation, the tool one execution looks like below:

image

We can try Migration using the + button from the left.

Enter the Source & Target database types.

image

image

Connect to the Source server.

image

image

On running the checks, you can see the results below.

image

Actual Migration

Now let us try performing the actual migration.

image

image

image

Click on the Deploy Schema button now.

image

Click on the Start data migration button now.

image

image

You can see the Migration is complete without any errors.

Summary

In this article we have explored using the Data Migration Tool from Microsoft.