Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

AlloyDB connecting from external network

Hi everyone, 

I took the AlloyDB preview for a spin, and now want to connect to it from   or something similar from a NodeJS server. I have a two scenarios in mind:

  1. Local development
  2. Deployment

Local development (steps)

  1. Created an AlloyDB cluster on a VPC
  2. Added a Cloud VPN gateway to the same VPC (with a static IP) and a cloud tunnel to my local IP (As a remote peer gateway)
  3. Run the AlloyDB Auth Proxy locally (with service account credentials, with the right roles as AlloyDB Client and AlloyDB Admin)
  4. Connecting via Knex to the locally running auth proxy shows a tcp:5433 timeout on the auth proxy end when trying to hit the private IP address of the AlloyDB instance (no firewall rules exist on the VPC, and it works when the auth proxy is run on a VM which has access to the same exact VPC!) 

No idea why, please advise. 

And I'm not sure how I would work this setup when trying to deploy my app too (I don't think adding a cloud tunnel from a production server to this VPC is a good idea, particularly for high frequency analytical query environment) I'm trying to run the AlloyDB Auth Proxy alongside my app (both in local and prod) and just connect Knex to the set port. Locally, it doesn't work even with the Cloud Tunnel workaround, and I have no mental model as to how this would work in production. 

Please advise.  

 

1 2 1,907
2 REPLIES 2

AlloyDB is a GCP product in Preview phase, this is not the appropriate forum to troubleshoot any issue related. I suggest opening a support case through the Support Hub page, or raise the question in the Stackoverflow site.

Having the same issue, arslnb did you find any solution?