Lesson 10 of 13 Amazon Redshift

Sharing Redshift Capacity with Workload Management

This lesson explains how workload management decides how memory and concurrency are shared among dashboards, ad hoc analysis and ETL, so heavy jobs do not slow time-critical queries.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish automatic and manual WLM, query priorities and concurrency scaling.
  • Isolate workloads with separate warehouses and data sharing.
  • Run SQL from pipelines with the Redshift Data API.

Workload management features

Workload management (WLM) decides how Redshift shares memory and concurrency between queries. Automatic WLM sizes memory and the number of concurrent queries itself, which is the recommended default. Queues and query priorities separate workloads, such as ETL, dashboards and ad hoc analysis, and favour the important ones. Query monitoring rules act on runaway queries, for example logging, moving to another queue (hopping) or aborting a query that scans too much or runs too long.

Concurrency scaling adds temporary capacity when queries start queuing during spikes, with free credits accumulated each day. Short query acceleration predicts which queries will be quick and runs them ahead of long ones, so small dashboard queries do not wait behind large reports. The following table summarises the features.

FeatureWhat it does
Automatic WLMManages memory and concurrency
Queues and query prioritiesSeparate workloads and favour important ones
Query monitoring rulesLog, hop or abort runaway queries
Concurrency scalingAdds temporary capacity when queries queue during spikes
Short query accelerationFast-tracks quick queries
Match the pairs

WLM features

Exam skills 3.3.4 · 2.1.1

Match each problem with the WLM feature.

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

Workload isolation by design

Workload management shares one warehouse's memory and concurrency between workloads, but they still compete for the same underlying resources. For stronger isolation, workloads can run on separate warehouses that read the same data through data sharing. For example, ETL can run on one Redshift Serverless workgroup and dashboards on another, each sized for its own workload and billed separately, so a heavy nightly load cannot slow the morning's dashboards, and the cost of each workload is visible.

The following diagram compares managing both workloads in one warehouse with separating them.

Two ways to stop ETL slowing dashboards. Within one warehouse, automatic WLM gives the dashboard queue high priority with concurrency scaling, and query monitoring rules abort runaway queries. For complete isolation, ETL runs on a separate Serverless workgroup that shares the same data, so neither workload affects the other.
Both approaches can be combined.

Running SQL from pipelines

Pipelines often need to run SQL in Redshift, for example to start a COPY or a MERGE after files arrive. Traditional database drivers require persistent connections and network configuration, which suit Lambda functions and Step Functions workflows poorly. The Redshift Data API runs SQL over HTTPS instead, authenticated with IAM or with credentials from AWS Secrets Manager, with no drivers or persistent connections.

Statements run asynchronously: the caller submits a statement, receives an ID immediately, and checks the result later with DescribeStatement and GetStatementResult. Step Functions can call the Data API directly through its service integrations, which makes it straightforward to orchestrate Redshift steps within a pipeline without keeping a function waiting for a long query.

True or false

The Redshift Data API

Exam skills 3.1.3 · 3.2.3

Decide whether each statement about the Redshift Data API is true.

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

Dashboards slowed by heavy ETL

During the day, analysts' dashboards slow down whenever a large ETL job runs. The following table pairs each problem with its fix.

ProblemFix
ETL and dashboards compete for resourcesAutomatic WLM with separate queues and query priorities (dashboards HIGH)
Sudden bursts of dashboard queriesConcurrency scaling for the dashboard queue
A runaway queryQuery monitoring rules that abort queries over a time limit

Alternatively, running ETL on a separate Redshift Serverless workgroup that reads and writes the same data through data sharing isolates the two workloads completely.

Check yourself

How are runaway queries stopped automatically?

Show answer

With WLM query monitoring rules, which can log, abort or move queries that exceed set limits.

Exam Tips

Remember for the exam

  • When queries queue during spikes in usage, enable concurrency scaling.
  • To stop runaway queries, use WLM query monitoring rules.
  • To favour dashboard queries over ETL, use query priorities.
  • For full isolation, run separate warehouses connected by data sharing.
  • To run SQL from Lambda without drivers or connections, use the Redshift Data API.