{"id":3087,"date":"2018-01-31T00:00:00","date_gmt":"2018-01-31T08:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops"},"modified":"2025-06-27T08:15:03","modified_gmt":"2025-06-27T15:15:03","slug":"lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/","title":{"rendered":"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp\" alt=\"image\" title=\"image\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Azure Cosmos DB provides a scalable database solution that can handle both batch and real-time ingestion and querying and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use <strong>batch-processing<\/strong>, <strong>stream-processing<\/strong>, and a <strong>serving layer<\/strong> to minimize the latency involved in querying big data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To implement a lambda architecture, you can use a combination of the following technologies to accelerate real-time big data analytics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/azure.microsoft.com\/services\/cosmos-db\/\">Azure Cosmos DB<\/a>, the industry&#8217;s first globally distributed, multi-model database service.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/azure.microsoft.com\/services\/hdinsight\/apache-spark\/\">Apache Spark for Azure HDInsight<\/a>, a processing framework that runs large-scale data analytics applications<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Azure Cosmos DB <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/change-feed\">change feed<\/a>, which streams new data to the batch layer for HDInsight to process<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The Spark to <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/spark-connector\">Azure Cosmos DB Connector<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We wrote a <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/lambda-architecture\">detailed article<\/a> that describes the fundamentals of a lambda architecture based on the original multi-layer design and the benefits of a &#8220;rearchitected&#8221; lambda architecture that simplifies operations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-lambda-architecture\">What is a lambda architecture?<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/cfcf8e0e-98cd-42ce-9f2c-adff8e044b77.webp\" alt=\"image\" title=\"image\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The basic principles of a lambda architecture are depicted in the figure above:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">All <strong>data<\/strong> is pushed into both the batch layer and speed layer.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>batch layer<\/strong> has a master dataset (immutable, append-only set of raw data) and pre-computes the batch views.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The ser<strong>ving layer <\/strong>has batch views for fast queries.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>speed layer<\/strong> compensates for processing time (to the serving layer) and deals with recent data only.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">All queries can be answered by merging results from batch views and real-time views or pinging them individually.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"speed-layer\">Speed layer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For speed layer, you can utilize the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/change-feed\">Azure Cosmos DB change feed support<\/a> to keep the state for the <em>batch layer<\/em> while revealing the Azure Cosmos DB change log via the <em>Change Feed API<\/em> for your <em>speed layer<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/c792860c-c3ec-4c82-9afa-212a1ad23d45.webp\" alt=\"image\" title=\"image\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What\u2019s important in these layers:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">All <strong>data<\/strong> is pushed only into Azure Cosmos DB, thus you can avoid multi-casting issues.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>batch layer<\/strong> has a master dataset (immutable, append-only set of raw data) and pre-computes the batch views.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>serving layer<\/strong> is discussed in the next section.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>speed layer<\/strong> utilizes HDInsight (Apache Spark) to read the Azure Cosmos DB change feed. This enables you to persist your data as well as to query and process it concurrently.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">All queries can be answered by merging results from batch views and real-time views or pinging them individually.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">For code example, please see <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/lambda-architecture#speed-layer\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"batch-and-serving-layers\">Batch and serving layers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Since the new data is loaded into Azure Cosmos DB (where the change feed is being used for the speed layer), this is where the <strong>master dataset<\/strong> (an immutable, append-only set of raw data) resides. From this point onwards, you can use HDInsight (Apache Spark) to perform the pre-compute functions from the <strong>batch layer<\/strong> to <strong>serving layer<\/strong>, as shown in the following figure:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/c515a38e-17eb-4136-8399-d21f59128b53.webp\" alt=\"image\" title=\"image\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What\u2019s important in these layers:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">All <strong>data<\/strong> is pushed only into Azure Cosmos DB (to avoid multi-cast issues).<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>batch layer<\/strong> has a master dataset (immutable, append-only set of raw data) stored in Azure Cosmos DB. Using HDI Spark, you can pre-compute your aggregations to be stored in your computed batch views.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The ser<strong>ving layer<\/strong> is an Azure Cosmos DB database with collections for the master dataset and computed batch view.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <strong>speed layer<\/strong> is discussed later in this article.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">All queries can be answered by merging results from the batch views and real-time views or pinging them individually.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">For code example, please see <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/lambda-architecture#batch-and-serving-layers\">here<\/a> and for complete code samples, see <a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/tree\/master\/samples\/lambda\">azure-cosmosdb-spark\/lambda\/samples<\/a> including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Lambda Architecture Rearchitected &#8211; Batch Layer <a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/blob\/master\/samples\/lambda\/Lambda%20Architecture%20Re-architected%20-%20Batch%20Layer.html\">HTML<\/a> | <a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/blob\/master\/samples\/lambda\/Lambda%20Architecture%20Re-architected%20-%20Batch%20Layer.ipynb\">ipynb<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\">Lambda Architecture Rearchitected &#8211; Batch to Serving Layer <a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/blob\/master\/samples\/lambda\/Lambda%20Architecture%20Re-architected%20-%20Batch%20to%20Serving%20Layer.html\">HTML<\/a> | <a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/blob\/master\/samples\/lambda\/Lambda%20Architecture%20Re-architected%20-%20Batch%20to%20Serving%20Layer.ipynb\">ipynb<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"speed-layer\">Speed layer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As previously noted, using the Azure Cosmos DB Change Feed Library allows you to simplify the operations between the batch and speed layers. In this architecture, use Apache Spark (via HDInsight) to perform the <em>structured streaming<\/em> queries against the data. You may also want to temporarily persist the results of your structured streaming queries so other systems can access this data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/dafc8294-1fef-46b0-80b9-4722c827e1ea.webp\" alt=\"image\" width=\"616\" height=\"375\"><br>To do this, create a separate Azure Cosmos DB collection to save the results of your structured streaming queries. This allows you to have other systems access this information not just Apache Spark. As well with the Azure Cosmos DB Time-to-Live (TTL) feature, you can configure your documents to be automatically deleted after a set duration. For more information on the Azure Cosmos DB TTL feature, see <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/time-to-live\">Expire data in Azure Cosmos DB collections automatically with time to live<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lambda-architecture-using-azure-cosmos-db-faster-performance-low-tco-low-devops\">Lambda Architecture using Azure Cosmos DB: Faster performance, Low TCO, Low DevOps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As noted above, you can simplify the original lambda architecture (with batch, serving, and speed layers) by using Azure Cosmos DB, Azure Cosmos DB Change Feed Library, Apache Spark on HDInsight, and the native Spark Connector for Azure Cosmos DB.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/57491d42-77ed-4aa8-888f-af5096b2679d.webp\" alt=\"image\" title=\"image\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This simplifies not only the operations but also the data flow.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">All data is pushed into Azure Cosmos DB for processing<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The batch layer has a master dataset (immutable, append-only set of raw data) and pre-computes the batch views<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The serving layer has batch views of data for fast queries.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The speed layer compensates for processing time (to the serving layer) and deals with recent data only.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">All queries can be answered by merging results from batch views and real-time views.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps\">Next steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you haven&#8217;t already, download the Spark to Azure Cosmos DB connector from the <a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\">azure-cosmosdb-spark<\/a> GitHub repository and explore the additional resources in the repo:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/tree\/master\/samples\/lambda\">Lambda architecture<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/Azure\/azure-documentdb-spark\/wiki\/Aggregations-Examples\">Distributed aggregations examples<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/tree\/master\/samples\">Sample scripts and notebooks<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/wiki\/Structured-Stream-demos\">Structured streaming demos<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/wiki\/Change-Feed-demos\">Change feed demos<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/Azure\/azure-cosmosdb-spark\/wiki\/Stream-Processing-Changes-using-Azure-Cosmos-DB-Change-Feed-and-Apache-Spark\">Stream processing changes using Azure Cosmos DB Change Feed and Apache Spark<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You might also want to review the <a href=\"https:\/\/spark.apache.org\/docs\/latest\/sql-programming-guide.html\">Apache Spark SQL, DataFrames, and Datasets Guide<\/a> and the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/hdinsight\/spark\/apache-spark-jupyter-spark-sql\">Apache Spark on Azure HDInsight<\/a> article. <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/lambda-architecture#batch-and-serving-layers\">The full version of this article<\/a> is published in our docs. Using the steps outlined in this blog, anyone, from a large enterprise to an individual developer can now build a lambda architecture for big data with Azure Cosmos DB in a matter of minutes. You can <a href=\"https:\/\/azure.microsoft.com\/try\/cosmosdb\/\">Try Azure Cosmos DB for free<\/a> today, no sign up or credit card required. Stay up-to-date on the latest Azure Cosmos DB news and features by following us on Twitter <a href=\"https:\/\/twitter.com\/search?q=%23cosmosDB&amp;src=typd\">#CosmosDB<\/a>, <a href=\"https:\/\/twitter.com\/AzureCosmosDB\">@AzureCosmosDB<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211;&nbsp;&nbsp;&nbsp; Your friends at Azure Cosmos DB<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1473,1485],"tags":[],"audience":[3057,3055,3056],"content-type":[],"product":[1538],"tech-community":[],"topic":[],"coauthors":[97],"class_list":["post-3087","post","type-post","status-publish","format-standard","hentry","category-databases","category-internet-of-things","audience-data-professionals","audience-developers","audience-it-implementors","product-azure-cosmos-db","review-flag-1680286581-295","review-flag-free-1680286579-836","review-flag-new-1680286579-546"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-31T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-27T15:15:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp\" \/>\n<meta name=\"author\" content=\"Microsoft Azure\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Azure\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/\",\"@type\":\"Person\",\"@name\":\"Microsoft Azure\"}],\"headline\":\"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps\",\"datePublished\":\"2018-01-31T08:00:00+00:00\",\"dateModified\":\"2025-06-27T15:15:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\"},\"wordCount\":1044,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp\",\"articleSection\":[\"Databases\",\"Internet of things\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\",\"name\":\"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp\",\"datePublished\":\"2018-01-31T08:00:00+00:00\",\"dateModified\":\"2025-06-27T15:15:03+00:00\",\"description\":\"Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/databases\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps | Microsoft Azure Blog","description":"Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/","og_locale":"en_US","og_type":"article","og_title":"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps | Microsoft Azure Blog","og_description":"Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2018-01-31T08:00:00+00:00","article_modified_time":"2025-06-27T15:15:03+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp","type":"","width":"","height":""}],"author":"Microsoft Azure","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Microsoft Azure","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/","@type":"Person","@name":"Microsoft Azure"}],"headline":"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps","datePublished":"2018-01-31T08:00:00+00:00","dateModified":"2025-06-27T15:15:03+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/"},"wordCount":1044,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp","articleSection":["Databases","Internet of things"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/","name":"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp","datePublished":"2018-01-31T08:00:00+00:00","dateModified":"2025-06-27T15:15:03+00:00","description":"Azure Cosmos DB provides a scalable database solution that can handle both ingestion and query, and enables developers to implement lambda architectures with low TCO. Lambda architectures enable efficient data processing of massive data sets. Lambda architectures use batch-processing, stream-processing, and a serving layer to minimize the latency involved in querying big data.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/01\/fff93ee9-b5cd-4fe4-93c3-44028fc91737.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/lambda-architecture-using-azure-cosmosdb-faster-performance-low-tco-low-devops\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"Lambda Architecture using Azure #CosmosDB: Faster performance, Low TCO, Low DevOps"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/3087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=3087"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/3087\/revisions"}],"predecessor-version":[{"id":44088,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/3087\/revisions\/44088"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=3087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=3087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=3087"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=3087"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=3087"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=3087"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=3087"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=3087"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=3087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}