Search code examples
azureazure-cosmosdb

Convert CosmosDB Serverless to Provisioned throughput DB


I am getting ready to create a brand new mobile application that communicates with CosmosDB and I will probably go the serverless way. The serverless way has some little disadvantages compared to the provisioned throughput (eg. only 50GB per container, no Geo-Redundancy, no Multi-region Writes, etc.).

If I need later on to convert my DB to a provisioned throughput one, can I do it somehow?

I know that I can probably use the change-feed and from that (I guess) recreate a new DB from it (provisioned throughput one) but this might open the Pandora's box especially while a mobile app connects to a specific DB.


Solution

  • As Gaurav mentioned, there is no way to change to Provisioned from Serverless plan once you create an account.

    You will need to recreate the account with Serverless as type and follow the below ways to migrate the data,

    (i) Data Migration Tool - You can easily migrate from one account to another

    (ii) ChangeFeed and Restore - push the changes to the new instance

    Once you are synced, switch to the new one.

    UPDATE:

    Is is currently supported in preview, https://learn.microsoft.com/en-gb/azure/cosmos-db/nosql/how-to-change-capacity-mode