RayDB LogoRayDB

Multi-region deployments

Multi-region deployments in RayDB enable your PostgreSQL clusters to be distributed across different geographical locations. This helps reduce latency, improve redundancy, and enhance disaster recovery.

Benefits of Multi-Region Deployments

  • Reduced Latency: Deploy clusters closer to users for faster query response times.
  • High Availability: Minimize downtime by distributing replicas across regions.
  • Disaster Recovery: Protect against regional failures by maintaining geographically redundant instances.

How Multi-Region Deployments Work

  • Primary Cluster in One Region: Your main PostgreSQL cluster operates in a chosen region.
  • Read Replicas in Other Regions: Additional replicas can be deployed in different regions to distribute read traffic.
  • Failover Between Regions: If the primary region fails, a read replica can be promoted to minimize downtime.

Setting Up a Multi-Region Deployment

  1. Log in to the RayDB Dashboard.
  2. Navigate to the Clusters section and select your primary cluster.
  3. Open the Replication tab.
  4. Click Create Read Replica and select a different region.
  5. Choose the instance size and confirm the deployment.

Managing Multi-Region Failover

  • Automatic Failover: If high availability is enabled, a replica in another region can be promoted automatically.
  • Manual Failover: Administrators can manually promote a read replica if needed.

Considerations

  • Replication Lag: Data replication across regions may introduce minimal latency.
  • Cross-Region Costs: Be aware of potential networking and data transfer fees.
  • Application Routing: Configure your application to direct read queries to the nearest replica.

Best Practices

  • Distribute Read Traffic: Use a load balancer to optimize regional read requests.
  • Monitor Regional Performance: Regularly check latency metrics and adjust deployments as needed.
  • Plan for Failover: Ensure disaster recovery policies include cross-region failover scenarios.

For more details on configuring read replicas, visit Read Replicas.

On this page