News for hackers. Stuff that matters.
Re:Azure Cosmos DB: Microsoft's Cloud-Born Globally Distribu... by maltalex on Sunday April 14, 2019 @11:01AM (#19659782)
To the brave, I recommend trying to make a copy of a CosmosDb collection.

The only solution that doesn't require spinning up a VM, reading all the data and writing it back again is the Azure Data Factory [0]. Which according to Azure's own benchmarks [1] manages to copy only 2MBps between two CosmosDb instances each with 100,000 RUs ("Resource Units"). That's more than half a day for a small 100GB collection.

And in case you're wondering whether 100K RUs is a lot, consider the cost: 5840$/Month for single-region writes. 11680$/Month for multi-region writes [2].

Oh, and as a bonus - can you guess the official procedure for restoring a collection from a backup? [3]:

> If you have accidentally deleted or corrupted your data, you should contact Azure support within 8 hours so that the Azure Cosmos DB team can help you restore the data from the backups.

And yeah, it's 8 hours because they backup the database every 4 hours and keep the last two backup copies [3]

[0]: https://docs.microsoft.com/en-us/azure/data-factory/introduc...

[1]: https://docs.microsoft.com/en-us/azure/data-factory/copy-act...

[2]: https://azure.microsoft.com/en-us/pricing/details/cosmos-db/

[3]: https://docs.microsoft.com/en-us/azure/cosmos-db/online-back...

Re:Azure Cosmos DB: Microsoft's Cloud-Born Globally Distribu... by llcoolv on Sunday April 14, 2019 @02:04PM (#19660749)
I am sorry to have to argue, but the multi-region writes are calculated N + 1, where N is the number of regions. So it would actually set you back $17520 [0]. And yes, I know that even their own documentation and calculator conflict on this, but they do charge the higher number.

0. https://docs.microsoft.com/bg-bg/azure/cosmos-db/optimize-co...

Re:Azure Cosmos DB: Microsoft's Cloud-Born Globally Distribu... by rnehme on Sunday April 14, 2019 @10:10PM (#19662806)
Hi, I am from Azure Cosmos DB Engineering Team.

We are in the process of updating the Azure pricing calculator to provide various options (e.g., # of regions, single vs. multi-master, etc.). The updates to the calculator are coming shortly.

In the meantime, please feel free to ping us at [email protected], if you need any help with cost estimates or have any questions.

Re:Azure Cosmos DB: Microsoft's Cloud-Born Globally Distribu... by maltalex on Sunday April 14, 2019 @02:30PM (#19660870)
Even better.
Re:Azure Cosmos DB: Microsoft's Cloud-Born Globally Distribu... by manigandham on Sunday April 14, 2019 @07:10PM (#19662232)
Why is using a VM not allowed? They have the Bulk Executor for large scale update/ingest: https://docs.microsoft.com/en-us/azure/cosmos-db/bulk-execut...

You can also use the changefeed system which is stored as an event-hub stream and then save it to another collection using Azure Functions.