Skip to content

Time for Blue/Green deployment

0

I am trying to get a rough idea of Blue/Green upgrade from PostgreSQL 13.15 to PostgreSQL 16.3 We will try the upgrade when there is very little activity on the server. It is a db.r6i.4xlarge instance with 18 TB of data. Anyone has some experience with Blue/Green deployment for multi-TB RDS for PostgreSQL ?

asked 2 years ago1.4K views

1 Answer
0

Blue/Green deployments for Amazon RDS PostgreSQL can be an effective way to perform major version upgrades with minimal downtime, even for large databases. For your specific case of upgrading from PostgreSQL 13.15 to 16.3 on a db.r6i.4xlarge instance with 18 TB of data, here are some key points to consider:

  1. Creation of the Green environment: The process begins by creating a staging (Green) environment that mirrors your production (Blue) environment. This includes cloning your primary database and any in-Region read replicas.

  2. Replication: The Green environment stays in sync with the Blue environment using logical replication. This is based on PostgreSQL's native logical replication feature, which replicates tables and their changes based on replication identity (usually a primary key).

  3. Upgrade process: You can either create the Green cluster on the new major version (16.3) as part of the deployment, or you can first create the Green cluster and then manually perform an in-place upgrade to the desired version.

  4. Switchover time: The actual switchover from Blue to Green environment is typically fast. However, the total time for the entire process, including setting up the Green environment and syncing data, will be longer for a multi-TB database like yours.

  5. Downtime: The Blue/Green deployment approach significantly reduces downtime compared to traditional in-place upgrades. The downtime is usually under one minute, but it can be longer depending on your workload. Most of the process occurs while your production database continues to operate normally.

  6. Best practices: Ensure each table has a replication identity, handle schema changes carefully, tune memory settings appropriately, and consider how to manage large objects, materialized views, and extensions.

  7. Testing: You can thoroughly test your database in the Green environment before switching over, which is crucial for a large, critical production databases.

While the exact time for the entire process can vary based on factors like your specific workload, schema complexity, and the number of database objects, Blue/Green deployments generally offer a more controlled and less risky approach for major version upgrades, especially for large databases. It's recommended to perform a test run in a non-production environment first to get a more accurate estimate of the time required for your specific database.

Remember to choose a time of low activity for the final switchover, as you've mentioned, to minimize any potential impact on your applications.
Sources
Overview of Amazon RDS Blue/Green Deployments - Amazon Relational Database Service
Supported Regions and DB engines for Amazon RDS Blue/Green Deployments - Amazon Relational Database Service
Limitations and considerations for blue/green deployments New – Fully managed Blue/Green Deployment in Amazon Aurora PostgreSQL and Amazon RDS for PostgreSQL | AWS Database Blog

answered 2 years ago

AWS
SUPPORT ENGINEER

reviewed 2 years ago

AWS
SUPPORT ENGINEER

revised 2 years ago

AWS
SUPPORT ENGINEER

revised 2 years ago

AWS
SUPPORT ENGINEER

revised 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.