Pricing
PlanetScale bills Private Service Connect ingress and egress at $0.01 per GB after the branch’s included allowance. Google Cloud also charges for Private Service Connect endpoints and applicable network transfer. See Neki pricing and the Google Cloud VPC pricing page.Prerequisites
- A Neki database in a GCP region.
- A Google Cloud VPC in the same region as the Neki database.
- IAM permissions to create Private Service Connect endpoints.
- The Cloud DNS and Service Directory APIs enabled in the Google Cloud project.
- A host in the VPC from which you can test DNS and Postgres connectivity.
Get the private connection details
1
From the PlanetScale dashboard, select your Neki database.
2
Open Settings, then select Roles.
3
Select the branch and open the role your application uses.
4
Select the required router group under Connection target.
5
Copy the Private Host and Private Service Name.
Create the Private Service Connect endpoint
1
In the Google Cloud console, open Private Service Connect and select
Connected endpoints.
2
Select Connect endpoint.
3
Select Published service as the target.
4
Enter the Private Service Name from PlanetScale as the target service.
5
Enter a descriptive endpoint name. The name becomes the first segment of
the private connection hostname.
6
Select the VPC and a subnet that your application resources can reach, then
reserve an IP address for the endpoint.
7
Enable global access if resources in other Google Cloud regions need to
reach this endpoint.
8
Create a Service Directory namespace so Google Cloud can create the private
DNS record automatically.
9
Create the endpoint and wait until its status is Accepted.
Build and verify the private hostname
The hostname combines the endpoint name from Google Cloud with the Private Host from PlanetScale:planetscale-main and a private host of
gcp-us-central1-1.private-pg.psdb.cloud produce:
Troubleshooting
If the connection fails:- Confirm that the endpoint status is Accepted.
- Confirm that the endpoint is in the same GCP region as the Neki database.
- Verify that the Cloud DNS and Service Directory APIs are enabled.
- Check that the application can route to the endpoint subnet.
- Confirm that the combined hostname resolves to the endpoint’s private address.
- Check firewall rules for outbound TCP traffic on port
5432.

