将数据推送到 Cosmos DB 时 Azure 流分析作业降级

标签 azure azure-cosmosdb azure-iot-hub azure-stream-analytics

我有从 Azure IoT 中心推送的数据 -> 流分析 -> CosmosDB

我有 1 个模拟设备,我的 Cosmos DB 集合为 1000 RU/s,运行良好。 现在我已经将其设置为 10 个模拟设备,并且我的 Cosmos DB 集合已扩展到 15000 RU/s,但我的流分析性能仍然下降。

我是否需要增加集合的并行连接数?

我们能否使其更加优化,如 Cosmos DB 的 Azure 定价,取决于吞吐量和 RU

最佳答案

Can we make it more optimal as Azure pricing of Cosmos DB, depend on throughput and RUs?

我只是想在这里与大家分享一些关于提高 Cosmos db 写入性能的想法。

1.一致性级别

基于document :

Depending on what levels of read consistency your scenario needs against read and write latency, you can choose a consistency level on your database account.

您可以尝试将一致性级别设置为最终。详情请引用here .

2.索引:

基于文档:

by default, Azure Cosmos DB enables synchronous indexing on each CRUD operation to your collection. This is another useful option to control the write/read performance in Azure Cosmos DB.

请尝试将索引设置为惰性。另外,删除无用的索引。

3.分区:

基于document :

Azure Cosmos DB unlimited are the recommended approach for partitioning your data, as Azure Cosmos DB automatically scales partitions based on your workload. When writing to unlimited containers, Stream Analytics uses as many parallel writers as previous query step or input partitioning scheme.

请对您的集合进行分区并在输出中传递分区键以提高写入性能。

关于将数据推送到 Cosmos DB 时 Azure 流分析作业降级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52998323/

相关文章:

sql - Azure 单一数据库与弹性池数据库

sql-server - 删除 Azure 架构或删除行需要很长时间

azure - Cosmos 中的热分区会增加 RU 消耗吗?

sql - CosmosDB 通用 OrderBy 查询或先获取最后的数据

azure - 尝试使用 IoT 中心设备预配服务注册设备时出现无效 CN 错误

azure - 如何将 Python 中的 MS Botframework 部署到 Azure

azure - ThingWorx Azure IOT 集线器连接器未启动

azure - 是否可以依次启动各个iot-edge模块?如果可以的话,该怎么办呢?

c# - DocumentDB 中每个集合的单个或多个实体

azure - 为 IoT Edge 部署 Azure 流分析作业