未指定Cosmos DB故障转移读取位置 [英] Cosmos DB failover read location when not specified

查看:64
本文介绍了未指定Cosmos DB故障转移读取位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我在三个区域A,B和C中设置了一个Cosmos DB,其中A是写入区域.另外,我还关闭了自动故障转移"功能. .

Let's say I have a Cosmos DB set up in three regions A, B, and C, where A is the write region. Also I have Automatic Failover turned off.

在客户端中使用.NET SDK时,如果我设置 ConnectionPolicy.EnableEndpointDiscovery = true ,但不要 ConnectionPolicy.PreferredLocations 属性,如果区域A中断,从客户端读取(和写入)会发生什么情况?

When using the .NET SDK in a client, if I set ConnectionPolicy.EnableEndpointDiscovery = true but don't specify anything for the ConnectionPolicy.PreferredLocations property, what will happen to reads (and writes), from the client, if region A has an outage?

此外,假设我确实指定了 ConnectionPolicy.PreferredLocations = {A,B} 并且这两个区域都发生了中断,那么会发生什么?

Also, suppose I do specify ConnectionPolicy.PreferredLocations = {A, B} and both those regions have outages, what happens then?

我找不到任何

I can't find any documentation that describes and explains the outcome of these scenarios.

推荐答案

如果启用了 EnableEndpointDiscovery ,则写入将自动路由到新的主要区域(如果未启用,则在主要区域中它们将失败失败).如果您具有 PreferredLocations ,则读取将按照优先顺序被路由到区域.如果未指定此选项,则当主数据库不可用时,读取将失败.换句话说,在区域性故障的情况下,必须使两者都具有高可用性.

If have EnableEndpointDiscovery enabled, writes will get automatically routed to the new primary region (if not, they will fail during a primary region failure). If you have PreferredLocations, reads will get routed to the regions in order of preferrence. If this is not specified, then reads will fail when the primary is unavailable. In other words, you must enable both to have high availability in case of a regional failure.

如果您具有 PreferredLocations = {A,B} 并且两个区域都失败,则在服务重新联机之前,将无法进行读取.通常,这种情况不太可能发生,因为它涉及多个区域同时发生故障.

If you have PreferredLocations = {A, B} and both regions fail, then reads will be unavailable till the services are brought back online. Generally, this scenario is very unlikely as it involves multiple regions failing simultaneously.

此处有一些其他详细信息: https://docs.microsoft.com/en-us/azure/cosmos-db/regional-failover

Some additional details here: https://docs.microsoft.com/en-us/azure/cosmos-db/regional-failover

这篇关于未指定Cosmos DB故障转移读取位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆