无法连接到跨区域网络资源

无法连接到跨区域网络资源

本文介绍了无服务器VPC访问连接器-无法连接到跨区域网络资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Cloud Function连接Cloud SQL Server.我的Cloud SQL Server位于asia-south1地区,该地区不支持部署Cloud Functions.因此,我在asia-east2地区创建并部署了Cloud Function,并尝试按照此链接中的说明使用私有IP连接到SQL Server: https://cloud.google.com/vpc/docs/configure-serverless-vpc-access .所有资源都在同一VPC中,并且面临连接超时错误.

I am trying to connect Cloud SQL Server from Cloud Function. My Cloud SQL Server exists in asia-south1 region and that region doesn't have support for deploying Cloud Functions. So, I created and deployed Cloud Function in asia-east2 region and trying to connect to SQL Server using private IP as instructed at this link: https://cloud.google.com/vpc/docs/configure-serverless-vpc-access. All resources are in same VPC and facing Connection Timeout error.

我还观察到,如果SQL Server和Cloud Function都托管在同一区域和同一VPC中,则可以使用无服务器VPC访问连接器毫无问题地访问SQL Server.

I also observed that if both SQL Server and Cloud Function hosted in the same region and same VPC, then able to access the SQL server without any issues using serverless VPC access connector.

是否支持跨区域访问功能?还是有其他方法可以实现这一目标?

Is that cross-region access feature is supported? Or is there any other way to achieve this?

推荐答案

目前不支持跨区域访问功能,因为SQL Server位于内部TCP/UDP负载均衡器:

At the moment cross-region access feature is not supported because the SQL Servers are behind Internal TCP/UDP Load Balancers:

但是,随着新 L4 ILB功能:

  1. ILB全局访问
  2. ILB是下一跳,具有对第三方设备集成的多NIC支持,从而提供了更高的可用性,规模和易于管理性.

关于您发布有关从Cloud函数连接到Cloud SQL Server(位于同一区域的资源)的信息,请告诉我您使用的是哪个SQL Server映像,函数的运行时间以及连接字符串是什么.我一直在尝试最后的日子,但没有成功.

Regarding you post about connecting from Cloud functions to Cloud SQL server (resources located on the same region) can you please tell me which SQL server image you used, what was the runtime of the function and what was the connection string. I was trying for the last days to reproduce without success.

这篇关于无服务器VPC访问连接器-无法连接到跨区域网络资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 09:09