繁体   English   中英

添加 NSG 规则以在 Azure PostgreSQL 灵活服务器上启用高可用性

[英]Adding NSG rules to enable high availability on Azure PostgreSQL Flexible Server

我正在尝试在我们的 Azure PostgreSQL 灵活服务器上启用 ZoneRedundant 高可用性。

Azure 文档提到了以下重要步骤:

High availability Features of Azure Database for PostgreSQL - Flexible Server require ability to send\receive traffic to destination ports 5432, 6432 within Azure virtual network subnet where Azure Database for PostgreSQL - Flexible Server is deployed, as well as to Azure storage for log archival. 如果您创建网络安全组 (NSG) 以拒绝流量流入或流出您的 Azure 数据库的 PostgreSQL - 部署其的子网内的灵活服务器,请确保允许流量流向子网内的目标端口 5432 和 6432,以及Azure 存储,使用服务标签 Azure 存储作为目标。

我发现很难从它的编写方式中理解这一点,并且在其他地方找不到关于它的许多细节。

据我了解,第一个要求是添加入站 NSG 规则,如下所示:

Source IP: [CIDR of the database subnet]
Source Port Range: *
Destination IP addresses: [CIDR of the database subnet]
Destination Port Ranges: 5432,6432
Action: Allow
Priority: [Any number before the default inbound DENY rules]

我读对了吗? 我们有效地允许子网内的实例和复制实例之间的流量,因此源 IP 和目标 IP 都应该是数据库子网 CIDR。

我知道 NSG 是有状态的。 所以我说我在这种情况下不需要任何出站规则是对的吗?

允许流量“通过使用服务标签 Azure 存储作为目标”的第二个要求让我感到困惑。 从这种写法来看,我不知道它应该是入站规则还是出站规则。 我的第一个猜测是出站,因为日志将从数据库移动到 Azure 存储。 那是对的吗?

• 根据 Microsoft 文档中的声明,所有与 Azure PostgreSQL 数据库相关或相关的资源都应该部署在同一个虚拟网络中。 该声明相应地指出,对于 Azure PostgreSQL 数据库 – 灵活服务器,应允许在同一子网内通过端口 5432 和 6432 的传入和传出流量

It is because the PostgreSQL Database Server listens to the localhost IP, ie, '127.0.0.1' through these ports only, ie, 5432 and 6432. Also, since these ports are by default not open and thus, are secure in these scenarios, the related Microsoft documentation text states accordingly

因此,基于此,您创建的 NSG 规则显然足以和正确地允许 PostgreSQL 数据库服务器的这些端口上的流量 And yes, the traffic rule needs to be created to the Azure storage from the Azure PostgreSQL database subnet and from the trusted network ranges/subnets to the Azure storage with the destination as Azure Storage as a service tag if only logs are to be transferred to that storage account 如果它是为其他目的而提供的,那么您将必须相应地创建规则。

确保为 Azure 存储帐户创建出站 NSG 规则,这将满足 Azure PostgreSQL 数据库服务器子网的要求

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM