{"id":8124,"date":"2024-05-21T08:00:28","date_gmt":"2024-05-21T15:00:28","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=8124"},"modified":"2024-05-22T03:25:06","modified_gmt":"2024-05-22T10:25:06","slug":"simplifying-your-azure-cosmos-db-migration-from-serverless-to-provisioned-throughput-preview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/simplifying-your-azure-cosmos-db-migration-from-serverless-to-provisioned-throughput-preview\/","title":{"rendered":"Simplifying your Azure Cosmos DB migration: From Serverless to Provisioned throughput (preview)"},"content":{"rendered":"<p>Azure Cosmos DB offers a range of options to fit the diverse needs of cloud applications, including the choice between serverless and provisioned throughput accounts. The serverless option is ideal for workloads with unpredictable patterns, but there are instances when transitioning to a provisioned throughput account is advantageous for enhanced performance and more efficient cost management.<\/p>\n<p>We are delighted to introduce a new feature that allows for the seamless transition of an Azure Cosmos DB account from serverless to provisioned throughput. This feature aims at streamlining the migration process for our customers, ensuring a smooth and efficient transition.<\/p>\n<h3>Need for migration<\/h3>\n<p>The shift from a serverless to a provisioned throughput model is a strategic move for several reasons:<\/p>\n<ul>\n<li><strong>Throttling issues:<\/strong>\u00a0Serverless accounts may experience throttling as demand increases, which can be mitigated by the dedicated throughput of provisioned capacity mode.<\/li>\n<li><strong>Cost efficiency:<\/strong>\u00a0If your usage consistently exceeds 15-20%, provisioned throughput can offer a more cost-effective solution.<\/li>\n<li><strong>SLA guarantees:<\/strong>\u00a0For production accounts that require stringent SLA guarantees, provisioned throughput provides a more reliable performance.<\/li>\n<li><strong>Global deployment:<\/strong>\u00a0Applications that demand deployment across multiple regions for improved availability and latency will benefit from provisioned capacity mode.<\/li>\n<li><strong>Overcoming serverless limitations:<\/strong>\u00a0Other limitations like scaling storage or throughput posed by the serverless model can be addressed by migrating to provisioned capacity mode.<\/li>\n<\/ul>\n<h3>Getting started<\/h3>\n<p>To initiate the migration, you must first enable the feature in your Azure Subscription.<\/p>\n<p>In the preview feature section of your Azure Subscription, look for \u2018<strong>Change capacity mode from serverless to provisioned throughput\u2019<\/strong> and register to enable the feature. Once the feature is enabled, you can proceed to next steps.<\/p>\n<h4>Change capacity mode using Azure Portal<\/h4>\n<p>Click on <strong>\u201cchange to provisioned throughput\u201d<\/strong> option on the overview page of your Azure Cosmos DB account to initiate the migration. Once confirmed, the migration process will start, and account\u2019s status will be changed to <strong>\u201cUpdating\u201d<\/strong> state.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431.png\"><img decoding=\"async\" class=\"aligncenter wp-image-8126 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431.png\" alt=\"Image Screenshot 2024 05 20 145431\" width=\"1581\" height=\"236\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431.png 1581w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431-300x45.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431-1024x153.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431-768x115.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-145431-1536x229.png 1536w\" sizes=\"(max-width: 1581px) 100vw, 1581px\" \/><\/a><\/p>\n<h4>Change capacity mode using Azure CLI<\/h4>\n<p>To initiate the capacity mode change from serverless to provisioned, use following CLI command<\/p>\n<p><code>az cosmosdb update -n &lt;account-name&gt; -g &lt;resource-group-name&gt; --locations regionName=&lt;azure-region&gt; --capacity-mode Provisioned<\/code><\/p>\n<p>After the command completion, you will see the changed capacity mode in the command output.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-150122.png\"><img decoding=\"async\" class=\"aligncenter wp-image-8127 size-large\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-150122-1024x381.png\" alt=\"Image Screenshot 2024 05 20 150122\" width=\"640\" height=\"238\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-150122-1024x381.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-150122-300x112.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-150122-768x286.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/05\/Screenshot-2024-05-20-150122.png 1249w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Throughput configurations<\/h4>\n<p>When a serverless account is changed to provisioned capacity mode account, all containers within the account shall be changed to manual provisioned throughput with the throughput values configured according to the below formula.<\/p>\n<p style=\"text-align: center;\"><code>RU\/s = max(5000, number of partitions * 1000)<\/code><\/p>\n<p>You can also change the provisioning mode from manual to autoscale, and the default configured Request units (RU\/s) once the migration is complete.<\/p>\n<h3>Limitations<\/h3>\n<p>There are a few limitations associated with capacity mode change process, listed below.<\/p>\n<ol>\n<li>There is no SLA for the duration of change capacity mode process.<\/li>\n<li>You cannot perform any management operation while the migration is in progress.<\/li>\n<li>This operation is irreversible, i.e. the capacity mode cannot be changed back to serverless again.<\/li>\n<li>In case there is a need to restore the serverless account after changing the capacity mode to provisioned throughput, the account will always be restored to provisioned capacity mode irrespective of restore timestamp.<\/li>\n<\/ol>\n<h3>Conclusion<\/h3>\n<p>Azure Cosmos DB\u2019s one-click migration feature is a commitment to building user-friendly services. With this new addition, managing your database\u2019s capacity mode is easier than ever, allowing you to focus on what truly matters &#8211; building great applications.\u00a0For more detailed instructions and support, <a href=\"https:\/\/aka.ms\/CosmosDB\/ChangeCapacityMode\" target=\"_blank\" rel=\"noopener\">refer to the official Azure documentation<\/a>.<\/p>\n<h3>About Azure Cosmos DB<\/h3>\n<p>Azure Cosmos DB is a fully managed and serverless distributed database for modern app development, with SLA-backed speed and availability, automatic and instant scalability, and support for open-source PostgreSQL, MongoDB and Apache Cassandra.\u00a0<a href=\"https:\/\/cosmos.azure.com\/try\/\" target=\"_blank\" rel=\"noopener\">Try Azure Cosmos DB for free here<\/a>. To stay in the loop on Azure Cosmos DB updates, follow us on\u00a0<a href=\"https:\/\/twitter.com\/AzureCosmosDB\" target=\"_blank\" rel=\"noopener\">X<\/a>,\u00a0<a href=\"https:\/\/aka.ms\/AzureCosmosDBYouTube\" target=\"_blank\" rel=\"noopener\">YouTube<\/a>, and\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\" target=\"_blank\" rel=\"noopener\">LinkedIn<\/a>.<\/p>\n<p>To quickly build your first database, watch our\u00a0<a href=\"https:\/\/youtube.com\/playlist?list=PLmamF3YkHLoLLGUtSoxmUkORcWaTyHlXp\" target=\"_blank\" rel=\"noopener\">Get Started videos<\/a>\u00a0on YouTube and explore ways to\u00a0<a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/optimize-dev-test\" target=\"_blank\" rel=\"noopener\">dev\/test free.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Azure Cosmos DB offers a range of options to fit the diverse needs of cloud applications, including the choice between serverless and provisioned throughput accounts. The serverless option is ideal for workloads with unpredictable patterns, but there are instances when transitioning to a provisioned throughput account is advantageous for enhanced performance and more efficient cost [&hellip;]<\/p>\n","protected":false},"author":90111,"featured_media":8135,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12,14,996],"tags":[1121],"class_list":["post-8124","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcements","category-core-sql-api","category-migration","tag-msbuild"],"acf":[],"blog_post_summary":"<p>Azure Cosmos DB offers a range of options to fit the diverse needs of cloud applications, including the choice between serverless and provisioned throughput accounts. The serverless option is ideal for workloads with unpredictable patterns, but there are instances when transitioning to a provisioned throughput account is advantageous for enhanced performance and more efficient cost [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/8124","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\/90111"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=8124"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/8124\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/8135"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=8124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=8124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=8124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}