As part of our ongoing mission to enhance the capabilities of Convox's v2 racks, we are excited to announce the support for deploying read replicas. This new feature allows you to create read-only copies of your primary databases, facilitating better scalability and performance for read-heavy workloads.
Read replicas are read-only copies of your primary database. They allow you to offload read traffic from the primary database, enabling you to scale out read-heavy workloads efficiently. This ensures that your main database can focus on write operations, enhancing overall performance and scalability.
Enhanced Performance and Scalability: By offloading read operations to replicas, you can significantly improve the performance of your applications and manage increased traffic seamlessly.
Simplified Configuration: Setting up read replicas is straightforward with Convox. You can configure them directly in your convox.yml
file, ensuring quick deployment and easy management.
Seamless Conversion to Active Database: Convox allows you to convert a read replica into an independent, active database without affecting the original primary database, providing flexibility and robustness in your database management strategy.
To deploy a read replica using Convox, you need to reference the source database in your convox.yml
file. Here’s an example configuration:
mysql-r:
type: mysql
options:
readSourceDB: <db-identifier>
class: db.t3.micro
encrypted: true
Alternatively, you can reference an existing Convox DB resource within the same YAML file:
resources:
mysql-main:
type: mysql
options:
class: db.t3.micro
encrypted: false
mysql-r:
type: mysql
options:
readSourceDB: "#convox.resources.mysql-main"
class: db.t3.micro
encrypted: true
Ensure that the source database is present before attempting to create the read replica.
If you need to convert a read replica into an active, independent database, simply remove the readSourceDB: <db-identifier>
option from the convox.yml
file and redeploy the application. This process will make the read replica an active database while keeping the original primary database unchanged.
convox.yml
file as shown above.readSourceDB
option from the convox.yml
file and redeploy.The introduction of read replica support in Convox's v2 racks underscores our commitment to providing robust and scalable database solutions. By leveraging this feature, you can enhance the performance and efficiency of your applications, ensuring they can handle increased read traffic with ease. This new capability is designed to simplify database management and improve overall application performance, allowing you to focus on building amazing things with Convox.