{"id":2417,"date":"2021-03-02T05:45:43","date_gmt":"2021-03-02T13:45:43","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=2417"},"modified":"2021-03-01T17:00:50","modified_gmt":"2021-03-02T01:00:50","slug":"three-reasons-to-upgrade-to-azure-cosmos-db-api-for-mongodb-4-0","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/three-reasons-to-upgrade-to-azure-cosmos-db-api-for-mongodb-4-0\/","title":{"rendered":"Azure Cosmos DB API for MongoDB v4.0 Is Here &#8211; Three Reasons to Upgrade Now"},"content":{"rendered":"<p><span data-contrast=\"auto\">G<\/span><span data-contrast=\"auto\">eneral availability<\/span><span data-contrast=\"auto\"> of the <a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/mongodb-introduction\" target=\"_blank\" rel=\"noopener\">Azure Cosmos DB API for MongoDB v4.0<\/a> was announced today at Microsoft Ignite.<\/span><span data-contrast=\"auto\">\u00a0This\u00a0<\/span><span data-contrast=\"auto\">exciting<\/span><span data-contrast=\"auto\"> release includes many new features to help you model complex business logic while leaving the tedious error handling to us.\u00a0 <\/span>Developers will find it simple to migrate applications currently using MongoDB 4.0, and multi-document transactions, to Azure Cosmos DB. These applications will gain instant elasticity, transparent auto-sharding, serverless, near real-time analytics with Azure Synapse Link, and more. Getting started is easy &#8211; a<span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0new or existing database account can be <a href=\"https:\/\/aka.ms\/upgrade-mongo-4\">enabled<\/a> in seconds, with zero downtime &#8211; and API versions 3.6 and 3.2 will continue to be supported.\u00a0 <\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">Watch the Ignite session &#8220;<a href=\"https:\/\/myignite.microsoft.com\/sessions\/cef28010-cbdb-488e-aaee-e2d97526137d\" target=\"_blank\" rel=\"noopener\">More scale, more performance. Get the latest from Azure Cache for Redis and Azure Cosmos DB<\/a>&#8220;, available on-demand, for details on the features and use cases of Azure Cosmos DB API for MongoDB v4.0.\u00a0<\/span><\/p>\n<h3 aria-level=\"1\">New features available in v4.0<\/h3>\n<p><span data-contrast=\"none\">The new version introduces three exciting new features and compelling reasons to upgrade:\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\" aria-level=\"1\"><strong>1. Multi-Document Transactions: <\/strong><a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/use-multi-document-transactions\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Multi-document transactions within an unsharded collection<\/span><\/a><span data-contrast=\"auto\"> support enables you to <\/span><span data-contrast=\"auto\">group together dependent operations and treat them as one operation, while respecting all ACID semantics.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\" aria-level=\"1\"><strong>2. New Aggregation Functions:<\/strong><span data-contrast=\"auto\">\u00a0<\/span><a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/mongodb-feature-support-40\"><span data-contrast=\"none\">Many more aggregation functions<\/span><\/a><span data-contrast=\"auto\"> are supported, such as <\/span><span data-contrast=\"auto\">the $toBool and $toDate conversion expressions. These will make your life easier by removing the need to handle these tasks in your application <\/span><span data-contrast=\"auto\">code<\/span><span data-contrast=\"auto\">.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p style=\"padding-left: 40px;\"><strong>3. Better Ecosystem Support: <\/strong><span data-contrast=\"auto\">4.0-compatible tooling makes the MongoDB ecosystem further accessible to developers.\u00a0<\/span><\/p>\n<h3>Upgrade to v4.0: step-by-step instructions<\/h3>\n<p><span data-contrast=\"auto\"><a href=\"https:\/\/aka.ms\/upgrade-mongo-4\">Upgrade to Azure Cosmos DB API for MongoDB v4.0<\/a> from version 3.6 or 3.2 directly in the Azure Portal or through Azure CLI.\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\"><em>Pro Tip:<\/em> Before beginning an upgrade, make sure your clients are running a MongoDB 4.0 compatible version. I<\/span><span data-contrast=\"auto\">t is<\/span><span data-contrast=\"auto\"> also important to <\/span><span data-contrast=\"auto\">start<\/span><span data-contrast=\"auto\"> by upgrading <\/span><span data-contrast=\"auto\">development<\/span><span data-contrast=\"auto\">\/<\/span><span data-contrast=\"auto\">test workloads before <\/span><span data-contrast=\"auto\">production workloads.\u00a0<\/span><\/p>\n<p><figure id=\"attachment_2597\" aria-labelledby=\"figcaption_attachment_2597\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/03\/image-2.jpg\"><img decoding=\"async\" class=\"wp-image-2597 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/03\/image-2.jpg\" alt=\"Easily update the MongoDB server version in your account\" width=\"794\" height=\"630\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/03\/image-2.jpg 794w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/03\/image-2-300x238.jpg 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2021\/03\/image-2-768x609.jpg 768w\" sizes=\"(max-width: 794px) 100vw, 794px\" \/><\/a><figcaption id=\"figcaption_attachment_2597\" class=\"wp-caption-text\">Easily update the MongoDB server version in your account<\/figcaption><\/figure><\/p>\n<p>&nbsp;<\/p>\n<h3>New to Azure Cosmos DB?<\/h3>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/four-ways-to-try-azure-cosmos-db-free\/\">Try Azure Cosmos DB free<\/a> in production or non-production environments<\/li>\n<li>Download the free\u00a0<a href=\"https:\/\/azure.microsoft.com\/resources\/azure-cosmos-db-onboarding-best-practices\/\" target=\"_blank\" rel=\"noopener noreferrer\">best practices and optimization guide\u00a0<\/a><\/li>\n<li class=\"x-hidden-focus\">Visit\u00a0<a href=\"https:\/\/docs.microsoft.com\/learn\/browse\/?terms=cosmos%20db\" target=\"_blank\" rel=\"noopener noreferrer\">MS Learn<\/a>\u00a0to build your Azure Cosmos DB skills<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Announced at Microsoft Ignite, Azure Cosmos DB API for Mongo DB v4.0 is now generally available! Discover exciting new features like multi-document transactions, explore upgrade options, and learn about the top three reasons you should upgrade now.<\/p>\n","protected":false},"author":53146,"featured_media":2597,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12,15],"tags":[1246,1774],"class_list":["post-2417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcements","category-mongodb-api","tag-mongodb","tag-msignite"],"acf":[],"blog_post_summary":"<p>Announced at Microsoft Ignite, Azure Cosmos DB API for Mongo DB v4.0 is now generally available! Discover exciting new features like multi-document transactions, explore upgrade options, and learn about the top three reasons you should upgrade now.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/2417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/53146"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=2417"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/2417\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/2597"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=2417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=2417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=2417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}