Managing Multi-AZ deployment - Amazon Redshift

Managing Multi-AZ deployment

Amazon Redshift Multi-AZ supports two Availability Zones at a time. Amazon Redshift automatically selects the Availability Zones based on the selected subnet group configuration. You can convert an existing single Availability Zone data warehouse into a Multi-AZ data warehouse or restore from a snapshot to configure it into a Multi-AZ data warehouse.

Using the Amazon Redshift console, you can easily create new Multi-AZ deployments. To create a new Multi-AZ deployment using the Amazon Redshift console, select the Multi-AZ option when creating the data warehouse. Specify the number of compute nodes required in a single Availability Zone, and Amazon Redshift will deploy that number of nodes in each of two Availability Zones. All nodes will be used to read and write workload processing during normal operation. You can also use the AWS CLI create-cluster command to create a new Multi-AZ data warehouse using the multi-az parameter.

You can convert an existing Single-AZ data warehouse into a Multi-AZ data warehouse, you can use either the Amazon Redshift console or the AWS CLI modify-cluster command using the multi-az parameter. Or, you can restore from a snapshot to configure a Single-AZ data warehouse into a Multi-AZ data warehouse either using the Amazon Redshift console or the AWS CLI restore-from-cluster-snapshot command using the multi-az parameter.

Multi-AZ deployment only supports RA3 node types that use Amazon Redshift Managed Storage (RMS). Amazon Redshift stores data in RMS, which uses Amazon S3 and is accessible in all Availability Zones in an AWS Region, without having to replicate the data at the Amazon Redshift level.

Setting up Multi-AZ when creating a new cluster

You can set up Multi-AZ deployment when creating a new cluster either using the Amazon Redshift console or the AWS Command Line Interface.

  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshiftv2/.

  2. On the navigation menu, choose Provisioned clusters dashboard, and choose Clusters. The clusters for your account in the current AWS Region are listed. A subset of properties of each cluster is displayed in columns in the list.

  3. Choose the button Create cluster to open the create cluster page.

  4. Enter properties for your cluster. For general information about creating clusters, see Creating a cluster.

  5. Choose one of the RA3 node types from the Node type drop-down list. The AZ configuration option becomes available only when you chose an RA3 node type.

  6. Under AZ configuration, choose Multi-AZ.

  7. Under Number of nodes per AZ, enter at least two nodes for your cluster.

  8. You have the option to load sample data or bring your own data:

    • In Sample data, choose Load sample data to load the sample dataset into your Amazon Redshift cluster. Amazon Redshift loads the sample dataset Tickit into the default dev database and public schema. Amazon Redshift automatically loads the sample dataset into your Amazon Redshift cluster. You can start using the query editor v2 to query data.

    • To bring your own data to your Amazon Redshift cluster, follow the steps in Bringing your own data to Amazon Redshift.

  9. Scroll down to Additional configurations, expand Network and security, and make sure that you either accept the default Cluster subnet group or choose another one. If you choose another cluster subnet group, make sure that there are 3 Availability Zones in the subnet group you selected.

  10. Under Additional configurations, expand Database configurations.

  11. To use a custom AWS KMS key instead of the default AWS Key Management Service key, click Customize encryption settings under Database encryption.

  12. Under Choose an KMS key, you can either choose an AWS Key Management Service key or enter an ARN. Or, you can click Create an AWS Key Management Service key in the AWS Key Management Service console. For more information about creating KMS keys, see Creating Keys in the AWS Key Management Service Developer Guide.

  13. Click Create cluster. When the cluster creation succeeds, you can view the details in the cluster details page. You can use your SQL client to load and query data.

To set up Multi-AZ when creating a cluster using the AWS Command Line Interface
  • From the AWS CLI use the create-cluster command and the multi-az parameter as follows.

    aws redshift create-cluster --port 5439 --master-username master --master-user-password ##### --node-type ra3.4xlarge --number-of-nodes 2 --profile maz-test --endpoint-url https://redshift.eu-west-1.amazonaws.com --region eu-west-1 --cluster-identifier test-maz --multi-az --maintenance-track-name CURRENT --encrypted

Converting a Single-AZ data warehouse to a Multi-AZ data warehouse

By converting a Single-AZ data warehouse to a Multi-AZ data warehouse, your data warehouse will be highly available with 99.99% SLA guarantee. The performance of an individual query will remain same even with a Multi-AZ data warehouse. For higher concurrency workloads, you will see a boost in overall throughput as Amazon Redshift can execute requests using compute resources in two Availability Zones.

Note

Amazon Redshift will not allow you to split existing compute resources while converting from Single-AZ to Multi-AZ, or vice versa. This operation isn't supported to maintain consistent individual query performance.

To convert a Single-AZ cluster to a Multi-AZ data warehouse using the console
  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshiftv2/.

  2. On the navigation menu, choose Provisioned clusters dashboard, and choose Clusters. The clusters for your account in the current AWS Region are listed. A subset of properties of each cluster is displayed in columns in the list.

  3. Choose the cluster you want to convert to a Multi-AZ deployment. The cluster details page appears.

  4. For Actions, choose Activate Multi-AZ. The modification summary appears. Click Activate Multi-AZ.

  5. When there is an error, do one of the following, then click Activate Multi-AZ.

    • Cluster encryption — Choose Properties to edit the encryption settings in the Database configuration section under the Properties tab of the cluster details page.

    • Subnet group — Choose Subnet group to edit the cluster subnet group settings by clicking the subnet group link. If you choose another cluster subnet group, make sure that there are 3 Availability Zones in the subnet group you selected.

    • Port settings — Choose Properties to edit the port setting in the Database configuration section under the Properties tab of the cluster details page.

  6. You can use your SQL client to load and query data.

  • From the AWS CLI, use the modify-cluster command and the multi-az parameter as follows.

    aws redshift modify-cluster --profile maz-test --endpoint-url https://redshift.eu-west-1.amazonaws.com --region eu-west-1 --cluster-identifier test-maz-11 --multi-az

Converting a Multi-AZ data warehouse to a Single-AZ data warehouse

By converting a Multi-AZ data warehouse to a Single-AZ data warehouse, your data warehouse will not get the 99.99% SLA guarantee which Multi-AZ offers. The performance of an individual query will remain same but the overall throughput will be affected because compute resources in the second Availability Zone won't be available. You have the option to enable concurrency scaling to automatically scale throughput for consistent performance even with Single-AZ.

Note

Amazon Redshift will not allow you to split existing compute resources while converting from Single-AZ to Multi-AZ, or vice versa. This operation isn't supported to maintain consistent individual query performance.

  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshiftv2/.

  2. On the navigation menu, choose Provisioned clusters dashboard, and choose Clusters. The clusters for your account in the current AWS Region are listed. A subset of properties of each cluster is displayed in columns in the list.

  3. Choose the cluster you want to convert to a Multi-AZ deployment. The cluster details page appears.

  4. For Actions, choose Deactivate Multi-AZ. The modification summary appears. Click Deactivate Multi-AZ.

  • From the AWS CLI, use the modify-cluster command and the no-multi-az parameter as follows.

    aws redshift modify-cluster --profile maz-test --endpoint-url https://redshift.eu-west-1.amazonaws.com --region eu-west-1 --cluster-identifier test-maz-11 --no-multi-az

Once your data warehouse is converted to Single-AZ, it will lose the 99.99 SLA guarantee. Overall throughput will also be impacted. When the changes are saved, you can view the details in the cluster details page.

Resizing a Multi-AZ data warehouse

You can resize a Multi-AZ data warehouse and specify a number of nodes or node type that is different from the current configuration of the data warehouse.

  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshiftv2/.

  2. On the navigation menu, choose Provisioned clusters dashboard, and choose Clusters. The clusters for your account in the current AWS Region are listed. A subset of properties of each cluster is displayed in columns in the list.

  3. Choose the cluster you want to resize the Multi-AZ data warehouse. The cluster details page appears.

  4. For Actions, choose Resize. The Resize cluster page appears.

  5. Follow the instructions on the page. You can resize the cluster now, once at a specific time, or increase and decrease the size of your cluster on a schedule.

  6. Under New configurations, choose one of the RA3 node types from the Node type drop-down list.

  7. Click Resize cluster.

To resize a Multi-AZ data warehouse using the AWS Command Line Interface
  • From the AWS CLI, use the resize-cluster command to change the number of nodes for a single Availability Zone as follows.

    aws redshift resize-cluster \ --cluster-identifier test-maz-11 --cluster-type multi-node --node-type ra3.4xlarge --number-of-nodes 6

Setting up Multi-AZ for a data warehouse restored from a snapshot

You can also create a new Multi-AZ cluster by restoring it from a snapshot.

  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshiftv2/.

  2. On the navigation menu, choose Clusters, Snapshots, then choose the snapshot to use.

  3. Choose Restore snapshot, Restore to a provisioned cluster.

  4. Enter properties for your cluster. For general information about creating clusters, see Creating a cluster.

  5. Choose one of the RA3 node types from the Node type drop-down list. The AZ configuration option becomes available only when you chose an RA3 node type.

  6. Under AZ configuration, choose Multi-AZ.

  7. Under Number of nodes per AZ, enter at least two nodes for your cluster.

  8. You have the option to load sample data or bring your own data:

    • In Sample data, choose Load sample data to load the sample dataset into your Amazon Redshift cluster. Amazon Redshift loads the sample dataset Tickit into the default dev database and public schema. Amazon Redshift automatically loads the sample dataset into your Amazon Redshift cluster. You can start using the query editor v2 to query data.

    • To bring your own data to your Amazon Redshift cluster, follow the steps in Load data from Amazon S3 to Amazon Redshift.

  9. Scroll down to Additional configurations, expand Network and security, and make sure that you either accept the default Cluster subnet group or choose another one. If you choose another cluster subnet group, make sure that there are 3 Availability Zones in the subnet group you selected.

  10. Under Additional configurations, expand Database configurations.

  11. Under Database encryption, to use a custom KMS key other than the default AWS Key Management Service key, click Customize encryption settings. This option is deselected by default.

  12. Under Choose an KMS key, you can either choose an AWS Key Management Service key or enter an ARN. Or, you can click Create an AWS Key Management Service key in the AWS Key Management Service console. For more information about creating KMS keys, see Creating Keys in the AWS Key Management Service Developer Guide.

  13. Click Restore cluster from snapshot. When the cluster restoration succeeds, you can view the details in the cluster details page.

  • From the AWS CLI, use the restore-from-cluster-snapshot command as follows.

    aws redshift restore-from-cluster-snapshot --region eu-west-1 --multi-az --snapshot-identifier test-snap1 --cluster-identifier test-saz-11 --endpoint-url https://redshift.eu-west-1.amazonaws.com/