Serverless VPC Access Connectors - Unable to connect to cross region network resource

微笑、不失礼 提交于 2020-04-17 22:11:51

问题


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.

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?


回答1:


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

Google Cloud Internal TCP/UDP Load Balancing is a regional load balancer that enables you to run and scale your services behind an internal load balancing IP address that is accessible only to your internal virtual machine (VM) instances.

However this might change with the implementation of the new L4 ILB features:

  1. ILB global access
  2. ILB as next-hop with multi-NIC support for third-party appliance integration that deliver greater availability, scale and ease of management.

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.



来源:https://stackoverflow.com/questions/60396509/serverless-vpc-access-connectors-unable-to-connect-to-cross-region-network-res

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!