简体   繁体   English

如何在 Cosmos DB 中测试多区域写入

[英]How to test multi-region write in Cosmos DB

I am going to test multi-region write functionality by writing some test code using the cosmos c# v3 SDK.我将通过使用 cosmos c# v3 SDK 编写一些测试代码来测试多区域写入功能。

I plan to have a multi-region write enabled cosmos DB (SQL core API) with three regions.我计划拥有一个具有三个区域的多区域写入启用的 cosmos DB(SQL 核心 API)。 I want to write to one specific region and then read from other regions.我想写入一个特定区域,然后从其他区域读取。 While doing it, I want to measure performance as well.在这样做的同时,我也想衡量性能。
Is there any way of implementing these type of tests?有什么方法可以实现这些类型的测试吗? Is there any good of measuring performance such as performance metrics?性能指标之类的衡量性能有什么好处吗? I also want to vary consistency level and see latency.我还想改变一致性级别并查看延迟。

Depending on what type of tests you are looking to do the benchmarks in this Cosmos DB Global Distribution Demos GitHub Repo may be of some help.根据您要执行的测试类型,此Cosmos DB 全球分布演示 GitHub Repo中的基准测试可能会有所帮助。 There's a bit of a learning curve as the benchmarks are data driven from app.config files.由于基准测试是从 app.config 文件驱动的数据,所以有一点学习曲线。 But once you get the URIs and keys in the app.config you should be mostly good to go.但是一旦你在 app.config 中获得了 URI 和密钥,你应该对 go 很满意。

One thing worth pointing out that changing consistency level when testing multiple writers and readers in different regions when configured for multi-region writes is meaningless because you will always have eventual consistency under those circumstances.值得指出的一件事是,在为多区域写入配置时在不同区域测试多个写入器和读取器时更改一致性级别是没有意义的,因为在这种情况下您将始终具有最终一致性。 For more information see, Guarantees associated with consistency levels .有关详细信息,请参阅与一致性级别关联的保证

The other thing to call out is you cannot configure multi-region writes with strong consistency.另一件需要注意的事情是你不能配置具有强一致性的多区域写入。 For more information see, Strong consistency and multiple write regions有关详细信息,请参阅强一致性和多个写入区域

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何构建多区域 firebase 应用程序? - How to structure a multi-region firebase app? 从 Spring 引导应用程序写入转发的多区域 Aurora - Multi-Region Aurora with write forwarding from Spring Boot Application 多区域 Aurora 上的多主机 - 可能吗? - multi-master over multi-region Aurora - possible? 如何在 cosmos db 中编写类似于 Mongo DB 聚合的聚合 - How to write aggregations in cosmos db similar to Mongo DB aggregations 为多区域保持 AWS API Gateway-Rest APIs 同步 - Keeping AWS API Gateway-Rest APIs on Sync for multi-region 为 Aurora MySQL 创建多区域主动-被动 DR 计划? - Creating a multi-region active-passive DR plan for Aurora MySQL? AWS- S3 多区域访问点在 C# 中的使用 - AWS- S3 Multi-Region Access point use in C# Postgres 数据库的多区域可用性能够为我们的客户提供 4+9 的可用性? - Multi-Region Availability for Postgres Database to be able to offer our clients 4+ 9's of availability? 面临 Azure cosmos 多区域 AKS 更改提要处理器的问题 - Facing issue with Azure cosmos change feed processor for Multi region AKS Cosmos DB 可能 window 的陈旧读取与 Session 在单个区域中的一致性 - Cosmos DB possible window of stale read with Session Consistency in a single region
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM