DR Practices for Cosmos DB Serverless Mode

ElenaMarlowe-3376 85 Reputation points
2025-06-08T10:08:17.94+00:00

Hi,

I'm looking for advice on disaster recovery approaches for Azure Cosmos DB in serverless mode.

Has anyone had experience with this scenario? (I currently have Continuous Backup enabled on my serverless Cosmos DB account.)

  1. Would it be a good idea to pre-create a second serverless Cosmos DB account in another region, and periodically copy data over (e.g., using Azure Functions or Data Factory)? Since serverless mode doesn’t incur costs when not actively used, this seems like a cost-effective standby approach, does that make sense in practice?
  2. Alternatively, would you recommend migrating/upgrading the serverless account to provisioned throughput mode instead? I haven’t tried this yet and I’m unsure whether a true "mode switch" is supported or if data migration is required.

I've reviewed this documentation: https://learn.microsoft.com/en-us/answers/questions/1179457/serverless-azure-cosmosdb-disaster-recovery

But I'd love to hear about any real-world experiences, any practical recommendations...regarding to like:

  • Cost-effectiveness
  • Failover complexity
  • Cross-region restore using Continuous Backup
  • Whether provisioned mode is better long-term for DR purposes

Any insights would be greatly appreciated!

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,902 questions
{count} votes

Accepted answer
  1. Mahesh Kurva 5,025 Reputation points Microsoft External Staff Moderator
    2025-06-09T09:40:38.4033333+00:00

    Hi ElenaMarlowe-3376,

    Greetings!!

    It sounds like you're exploring disaster recovery (DR) options for your Azure Cosmos DB in serverless mode, specifically with Continuous Backup enabled.

    Here are some insights and recommendations based on your queries:

    Pre-Creating a Second Serverless Cosmos DB Account

    • Creating a second serverless Cosmos DB account in another region and periodically copying data over can be a cost-effective standby approach. Since serverless mode doesn't incur costs when not actively used, this strategy can help you maintain a backup without significant expenses. Using Azure Functions or Data Factory for periodic data copying is a practical method.

    Migrating to Provisioned Throughput Mode

    • Migrating or upgrading to provisioned throughput mode can offer more predictable performance and potentially better disaster recovery options. However, a true "mode switch" from serverless to provisioned throughput isn't directly supported, so you would need to migrate your data. This might involve some downtime and complexity.

    Cost-Effectiveness

    • Serverless Mode: Cost-effective for low to intermittent usage. Ideal for development, testing, or applications with unpredictable traffic.
    • Provisioned Throughput Mode: Better for applications with consistent, high throughput requirements. It can be more cost-effective in the long run if your usage patterns justify the reserved throughput.

    Failover Complexity

    • Serverless Mode: Manual failover processes using periodic data copying can be complex and require careful planning.
    • Provisioned Throughput Mode: Supports features like multi-region writes and automatic failover, which can simplify disaster recovery.

    Cross-Region Restore Using Continuous Backup

    • Continuous Backup in Cosmos DB allows you to restore data to any point within the retention period. This feature is beneficial for recovering from accidental deletions or corruptions. However, cross-region restore might still require manual intervention to set up the new environment and restore the data.

    Long-Term DR Purposes

    • For long-term disaster recovery, provisioned throughput mode with multi-region writes and automatic failover capabilities might be more robust and easier to manage. It provides higher availability and resilience, especially for mission-critical applications.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.