ScaleGrid PostgreSQL deployments are available with and without SSL enabled. In either case, you can easily connect to them using your connection string provided on your Cluster Details page.
Click the copy button next to the Connection String box to copy the connection string. Please note that you still need to fill in the password placeholder field that you can find above in the Credentials area.
The Connection String is built in the following format:
For more details on connection strings in PostgreSQL, check out their official documentation or the driver-specific documentations.
Before connecting to your PostgreSQL database, you can select the endpoint your application needs to connect to. In a replica-set deployment, you will have the following endpoints defined.
- Master - This endpoint always points to the Master (primary) of your PostgreSQL deployment.
- Read Replica (Generic) - Points to 1 or more replica (standby) nodes depending on the number of replica nodes configured in your deployment. For example, in a 3-node deployment with 2 replicas, Read Replica (Generic) endpoint will be a DNS A record containing the IP addresses of the 2 replica nodes. When this endpoint is used from your application, the traffic will be automatically distributed between the 2 replicas.
- Read Replica <n> - Each read replica in your deployment will get its own endpoint. Typically endpoints can be used in your applications that do specific jobs like Reporting, Analytics, etc.
- For High-Performance PostgreSQL deployments, that use a local SSD node for the data, there will be special endpoints labeled as Read Replica SSD <n>, that always point to SSD replica nodes.
** Please note that any replica endpoint above, should be strictly used for read-only traffic.
Updated about a month ago