允许负载平衡实例连接单个计算实例 postgresql 服务器
Allow load balanced instances to connect single compute instance postgresql server
我正在寻找 GCP 网络最佳实践,在那里我可以允许将自动缩放的实例连接到安装在单独实例上的 Postgresql 服务器。
到目前为止,我尝试在防火墙和 postgresql 配置文件中将负载均衡器 IP 列入白名单,但失败了。
非常感谢任何帮助或指点。
负载均衡器本身不处理信息,它只是重定向前端地址并使用 Instance Groups
管理请求。
该实例组应管理 HTTP 请求并与数据库实例连接。
负载均衡器用于动态分配(甚至创建额外的实例)以处理同一前端地址上的请求。
--
所以首先你应该让它与常规实例一起工作,配置它并保存实例模板。然后您可以继续创建一个可以由负载均衡器管理的实例组。
编辑 - 扩展了我评论中的答案
"I don't think your problem is related to Google cloud platform now. If you have a known IP address for the PostgreSQL server (connect using an internal network IP address so it doesn't change), then make sure your auto-balanced instances are in the same internal network, use db's internal IP and connect to it."
我正在寻找 GCP 网络最佳实践,在那里我可以允许将自动缩放的实例连接到安装在单独实例上的 Postgresql 服务器。
到目前为止,我尝试在防火墙和 postgresql 配置文件中将负载均衡器 IP 列入白名单,但失败了。
非常感谢任何帮助或指点。
负载均衡器本身不处理信息,它只是重定向前端地址并使用 Instance Groups
管理请求。
该实例组应管理 HTTP 请求并与数据库实例连接。
负载均衡器用于动态分配(甚至创建额外的实例)以处理同一前端地址上的请求。
--
所以首先你应该让它与常规实例一起工作,配置它并保存实例模板。然后您可以继续创建一个可以由负载均衡器管理的实例组。
编辑 - 扩展了我评论中的答案
"I don't think your problem is related to Google cloud platform now. If you have a known IP address for the PostgreSQL server (connect using an internal network IP address so it doesn't change), then make sure your auto-balanced instances are in the same internal network, use db's internal IP and connect to it."