Lesson 1 of 13 Amazon Redshift

Understanding Amazon Redshift Architecture and Deployment Options

This lesson explains how Amazon Redshift, a columnar, massively parallel processing (MPP) data warehouse, stores data and runs queries, which explains its performance features and deployment choices.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose between provisioned RA3 clusters and Redshift Serverless.
  • Describe how leader and compute nodes run queries in parallel.
  • Describe Redshift Managed Storage.
  • Identify the snapshot and recovery options.

Deployment options

Amazon Redshift runs in two ways. Provisioned RA3 clusters have a chosen number and type of compute nodes, while the data lives in Redshift Managed Storage, which grows independently, so storage and compute are sized separately. Clusters can be paused when idle and resized as needs change, and with steady use they cost less, especially with reserved nodes. Redshift Serverless has no clusters: capacity is measured in Redshift Processing Units (RPUs), scales automatically with the workload, and is charged only while queries run. That suits variable, unpredictable or occasional workloads. The following table summarises the options.

OptionHow it worksBest for
Provisioned RA3 clustersCompute nodes separate from Redshift Managed Storage, which grows independently; can be paused and resizedSteady workloads
Redshift ServerlessCapacity in RPUs, scales automatically, pay only while queries runVariable or unpredictable workloads

The following diagram compares two teams' Redshift query load over a week.

The two teams' query load over a week. Finance runs reports a few times a day and is idle at night and at weekends, so Redshift Serverless, which charges only while queries run, costs least. Operations dashboards are queried continuously, so provisioned RA3 nodes with reservations cost least. Both keep data in managed storage.
The load profiles are illustrative.
Sort into groups

Provisioned or Serverless?

Exam skills 3.2.5 · 2.1.1

Choose the Redshift deployment option for each workload.

Log in to try this activity Interactive activities are free with an account.

How queries run

Amazon Redshift is a massively parallel processing (MPP) warehouse: it divides each query among many workers that process different parts of the data at the same time. The leader node receives the SQL, parses it, builds an execution plan and compiles the plan into code. It then sends the work to the compute nodes, each of which is divided into slices; every slice holds a portion of each table and processes that portion in parallel with the others. The leader node combines the slices' results and returns them to the client.

Storage is designed for analytics. Redshift stores data by column and compresses each column, so a query reads only the columns it uses. For each block of data, it records the minimum and maximum values in zone maps; a query filtered on a column can skip every block whose range cannot contain matching values. This is why sort keys, described in the lesson Designing Redshift Tables with Distribution Styles and Sort Keys, have such an effect on performance: sorted data makes zone maps far more selective.

The following diagram shows the leader node, compute nodes, slices and managed storage.

How Redshift runs a query. The leader node parses the SQL, plans it and compiles code, then sends the work to the compute nodes. Each node's slices process their portion of every table in parallel, reading only the columns needed and skipping blocks by their zone maps, and the leader combines the results. Data lives in Redshift Managed Storage, backed by S3, with hot data cached on local SSDs.
Node and slice counts are illustrative.
Match the pairs

Redshift architecture

Exam skills 2.1.1

Match each component with its role.

Log in to try this activity Interactive activities are free with an account.

Redshift Managed Storage

RA3 nodes and Redshift Serverless store data in Redshift Managed Storage (RMS), which is backed by Amazon S3, while frequently used data is cached on the compute nodes' local SSDs for speed. Because the data lives in managed storage rather than on the compute nodes, storage and compute scale independently: a warehouse with a large history but modest query load does not need many nodes just to hold its data.

Separating storage from compute also enables several features covered later in this module. Data sharing lets other warehouses read the same data without copying it, concurrency scaling adds temporary compute that reads the same storage during spikes, and multi-warehouse designs let several compute resources, such as an ETL workgroup and a BI workgroup, work on the same data.

Availability and recovery

Redshift protects data and availability in several ways. Snapshots are point-in-time backups stored in Amazon S3. Automatic snapshots are taken regularly and kept for a configurable retention period, while manual snapshots are kept until deleted. Snapshots can be copied automatically to another Region, so the warehouse can be restored there if the primary Region becomes unavailable.

For availability within a Region, RA3 clusters can be deployed in Multi-AZ mode, which keeps compute running in two Availability Zones so the warehouse continues to serve queries if one zone fails. Cluster relocation moves a cluster to another Availability Zone without data loss, for example when capacity in the original zone is constrained; because data is in managed storage, the move is quick.

Match the pairs

Redshift resilience

Exam skills 2.3.6

Match each requirement with the Redshift feature.

Log in to try this activity Interactive activities are free with an account.
Worked example

Provisioned or Serverless?

Two teams are choosing how to run Redshift. The following table summarises their workloads and the deployment chosen for each.

TeamWorkloadChoiceReason
FinanceReports run a few times a day, idle at night and weekendsRedshift ServerlessPays only while queries run
OperationsDashboards queried continuously by hundreds of users, 24 hours a dayProvisioned RA3 with Reserved InstancesSteady, predictable usage is cheaper on reserved nodes

Both keep their data in Redshift Managed Storage, so finance can also read operations data through data sharing without copies. Either team can change its choice later, because storage is independent of compute.

Check yourself

What does the leader node do?

Show answer

It plans queries and coordinates the compute nodes, whose slices process the data in parallel.

Exam Tips

Remember for the exam

  • Variable workloads where you pay only for use suit Redshift Serverless.
  • RA3 nodes separate compute from Redshift Managed Storage.
  • Slices on compute nodes process data in parallel; the leader node plans queries.
  • Zone maps let Redshift skip blocks that cannot match a filter.
  • Copy snapshots to another Region for disaster recovery.