5.13. Manual Scaling a Running Presto Cluster

Using the Starburst CloudFormation template for Presto, the user can scale their cluster up and down to match demand. Also see the Auto Scaling Presto documentation.

Scale Up and Down

Add or Remove Presto Worker Nodes Using the AWS CloudFormation Console

1. CloudFormation Console
Navigate to the CloudFormation Console under “Management Tools” within the Services menu.
2. Choose a Stack
Select the Presto cluster (CloudFormation stack) you wish to alter.
3. Actions Menu
Navigate to the Actions drop-down menu and click “Update Stack”.
4. Select Template

Once you have arrived at the Select Template page within your stack update, you should find a pre-populated field under “Amazon S3 template URL”. Please click “next”. Note, selecting “Use current template” will achieve the same result.

5. Specify Details

Within the Specify Details page navigate to the “Workers Count” field and increase and decrease the node count to meet your needs.

6. Review and Update
Navigate through to the Review page and look over your changes. When content, click “Update” to conclude the up-scale/down-scale of your Presto cluster.

Attach and Remove an Instance Using the AWS CLI

1. Open a Terminal Window
Open a terminal window to begin a command line.
2. Update Stack
Use the update stack command to initiate the update of your Presto cluster (CloudFormation stack).
aws cloudformation update-stack
3. Choose a Stack
Specify the name or unique stack ID of the Presto cluster to update.
--stack-name (string)
4. Select Template

Indicate the template you will be using to create your cluster. This should be the same template used to create the Presto cluster.

Set Previous: Reuse the existing template that is associated with the cluster that you are updating. Set UsePreviousTemplate to true.

5. Add or Remove Instances
Specify a new value for the WorkersCount parameter and indicate to the AWS CLI that you do not want to change value of any other parameters.
ParameterKey=WorkersCount,ParameterValue= 1

Reference the Example section below for a complete example of what to enter into the CLI.
6. Review and Update

Finally, review the details of your cluster and your commands. When content, proceed by pressing enter to finish updating your Presto cluster.

See the following create-stacks command as a reference for your Presto cluster update:

 aws cloudformation update-stack \
     --stack-name teststack \
     --use-previous-template \
     --parameters \
     "ParameterKey=VPC,UsePreviousValue=true" \
     "ParameterKey=Subnet,UsePreviousValue=true" \
     "ParameterKey=SecurityGroups,UsePreviousValue=true" \
     "ParameterKey=WorkersInstanceType,UsePreviousValue=true" \
     "ParameterKey=KeyName,UsePreviousValue=true" \
     "ParameterKey=IamInstanceProfile,UsePreviousValue=true" \
     "ParameterKey=WorkersCount,ParameterValue=3" \
     "ParameterKey=LaunchSuperset,UsePreviousValue=true" \
     "ParameterKey=MetastoreType,UsePreviousValue=true" \
     "ParameterKey=ExternalMetastoreHost,UsePreviousValue=true" \
     "ParameterKey=ExternalMetastorePort,UsePreviousValue=true" \
     "ParameterKey=ExternalRdbmsMetastoreUserName,UsePreviousValue=true" \
     "ParameterKey=ExternalRdbmsMetastorePassword,UsePreviousValue=true" \
     "ParameterKey=ExternalRdbmsMetastoreDatabaseName,UsePreviousValue=true" \
     "ParameterKey=AdditionalCoordinatorConfigurationURI,UsePreviousValue=true" \
     "ParameterKey=AdditionalWorkersConfigurationURI,UsePreviousValue=true" \

The above commands yield output like the following: