With the Space Developer role, you can configure the App Autoscaler service in Apps Manager to automatically scale apps in your TAS for VMs deployment.

You can use the App Autoscaler command-line interface (CLI) plugin to configure App Autoscaler rules from the command line. For more information, see Using the App Autoscaler CLI.

Note pace Managers, Space Auditors, and all Org roles do not have permission to use App Autoscaler. For help managing user roles, see Managing User Accounts and Permissions Using Apps Manager.

Overview on how to auto scale your apps with App Autoscaler

To use App Autoscaler to automatically scale your apps in you VMware Tanzu Application Service for VMs (TAS for VMs) deployment, you must create and bind the App Autoscaler service, then configure scaling rules for App Autoscaler.

For more information about App Autoscaler, including information about how to create scaling rules, see About App Autoscaler.

Prerequisite

Before using the Autoscaler service in Apps Manager, you must configure the search-server app for any deployments that have restrictive networking policies around request proxying.

Autoscaler controls may not appear for apps in Apps Manager if your TAS for VMs deployment has restrictive networking policies around request proxying.

To resolve this issue and enable Autoscaler controls in Apps Manager:

  1. Using the cf CLI, log in to the system org and system space.
  2. Locate the search-server app.
  3. Update the no_proxy environment variable for the search-server app to include your system domain.

    cf set-env search-server no_proxy '*.SYSTEM-DOMAIN'
    

    where SYSTEM-DOMAIN is the system domain configured for your TAS for VMs deployment. For example:

    cf set-env search-server no_proxy '*.example.com'
    
  4. Restage the search-server app.

    cf restage search-server
    

Configure App Autoscaler

To configure App Autoscaler:

  1. Create and bind the App Autoscaler service to your app. See Create and Bind the App Autoscaler Service.

  2. Configure autoscaling instance limits for your app. See Configure Autoscaling for an App.

Create and bind the App Autoscaler service

To use App Autoscaler, you must create an instance of the App Autoscaler service and bind it to any app you want to autoscale. You can do this using either the Apps Manager or from the Cloud Foundry Command Line Interface (cf CLI):

Important Manual scaling overrides scaling rules that you configure with App Autoscaler. If you manually scale an app bound to an App Autoscaler service instance, the App Autoscaler instance automatically unbinds from that app, and the app scales to the manual setting. For more information, see Managing Apps and Service Instances Using Apps Manager.

To enable App Autoscaler for an app:

  1. In Apps Manager, select an app from the space in which you created the App Autoscaler service.

  2. Under Processes and Instances, enable Autoscaling. At the top of the image is the header 'Processes and Instances'. Below it is the subheader 'web', below which is a row of metrics: 'Instances: 2', 'Memory Allocated: 1 GB', and 'Disk Allocated: 512 MB'. To the right of these metrics is a grayed-out blue, rectangular button labeled 'Scale'. Below these metrics are a sliding button labeled 'Autoscaling' to the far left and the words 'Manage Autoscaling' in blue letters to the far right. Below these are a table with five columns labeled, from left to right, '#', 'CPU', 'Memory', 'Disk', and 'Uptime'. Below these are two rows. Under '#' are the number '0' in the first row and '1' in the second. Under 'CPU' is the text '0%' in both the first and second rows. Under 'Memory' is the text '6.63 MB' in the first row and '27.98 MB' in the second. Under 'Disk' is the text '51.07' in both the first and second rows. Under 'Uptime' is the text '4 d 21 hr 58 min' in the first row and '4 d 21 hr 56 min' in the second row.

  3. Click Manage Autoscaling to configure instance limits, scaling rules, and scheduled limit changes for the app. For more information, see Configure Autoscaling for an App. At the top of the image is a black X to close the window, followed by the header 'Manage Autoscaling'. Below the header is a white, rectangular button labeled 'Disable Autoscaling'. To the far right of the button is a link,'Download Autoscaler CLI', which points to the Autoscaler CLI page on Tanzu Network. Below is a subheader, 'Instance Limits'. This section shows a thin gray progress bar with the first two fifths in blue, labeled 'Currently in use: 2'. Below the bar are two text fields. The text field on the left is labeled 'Minimum' and has a value of '1'. The text field on the right is labeled 'Maximum' and has a value of '5'. To the right of the text fields is a grayed-out blue, rectangular button labeled 'Apply Changes'.

Configure autoscaling for an app

App Autoscaler keeps instance counts within an allowable range defined by minimum and maximum values. The minimum and maximum values are called instance limits.

For more information about how App Autoscaler makes scaling decisions for an app, see How App Autoscaler Determines When to Scale in About App Autoscaler.

Follow the procedures in the sections below:

Create or modify instance limits

This section describes how to create and edit instance limits for app scaling rules. You can also schedule changes to your instance limits for a specific date and time. For more information, see Scheduled Limit Changes.

To manually modify instance limits:

  1. In Apps Manager, go to the Overview page for your app. Under Processes and Instances, click Manage Autoscaling.

  2. In the Instance Limits section, set values for Minimum and Maximum. alt-text=At the top of the image is a black X to close the window, followed by the header Manage Autoscaling. Below the header, on the far right, is a link, Download Autoscaler CLI, which points to the Autoscaler CLI page on Tanzu Network.

  3. Click Apply Changes.

Add or Delete scaling rules

The following procedures describe how to add and delete scaling rules for your apps with App Autoscaler.

For more information about scaling rules and metrics in App Autoscaler, see About App Autoscaler Scaling Rules.

To add a scaling rule for an app:

  1. In the Manage Autoscaling pane, click Edit next to Scaling Rules. The Edit Scaling Rules pane appears.

  2. Click Add Rule.

  3. In the Select type drop-down menu, select the metric for the new scaling rule. alt-text=At the top of the image is a gray left arrow that returns to the previous screen, next to a header, Edit Scaling Rules. Below is the text: 'Apps scale by 1 instance per event. Apps can scale up when any metric maximum is met and scale down only when all metric minimums are met.

  4. Set the minimum and maximum thresholds for the metric. For information about setting instance limits, see About App Autoscaler Scaling Rules in About App Autoscaler.

  5. Select or fill in any other fields that appear under the threshold fields:

    • If you are adding an HTTP Latency rule, configure Percent of traffic to apply.
    • If you are adding a RabbitMQ depth rule, provide the name of the queue to measure.
    • If you are adding a Custom rule, enter your custom Metric.
    • If you are adding a Compare rule, enter values in the Metric and Comparison Metric fields.
  6. Click Save.

To delete a scaling rule for an app:

  1. Click the x icon next to the rule you want to delete.

  2. Click Save.

Create or modify scheduled limit changes

Because app demand often follows a weekly, daily, or hourly schedule, you can schedule App Autoscaler to change the allowable instance range to track expected surges or quiet periods.

To create or modify a scheduled limit change:

  1. Click Edit next to Scheduled Limits.

  2. Click Add New to add a new scheduled limit or select an existing entry to modify by clicking EDIT next to the entry.

  3. Edit the following values:

    • Date and Time (local): Set the date and time of the change.
    • Repeat (Optional): Set the day of the week for which you want to repeat the change.
    • Min and Max: Set the allowable range within which App Autoscaler can change the instance count for an app. alt-text=""
  4. Click Save.

Note In time zones that observe Daylight Saving Time, Apps Manager may not account for changes in offset from UTC time when it applies scheduled limit changes. For more information, see Apps Manager might not respect the day of the week when creating an autoscaler scheduled limit change in the VMware Tanzu Knowledge Base.

To delete an existing entry, click the x icon next to the entry you want to delete.

For example, to schedule an app to scale down for a weekend, you can enter two rules as follows:

  1. Scale down to a single instance on Friday evening:

    • Date and Time (local): Dec, 2, 2018 and 7:00 PM
    • Repeat (Optional): Fr
    • Min and Max: 1 and 1
  2. Increase instances to between 3 and 5 on Monday morning:

    • Date and Time (local): Dec, 5, 2018 and 7:00 AM
    • Repeat (Optional): M
    • Min and Max: 3 and 5

View and manage App Autoscaler events and notifications

App Autoscaler logs all autoscaling events. You can view event history and manage notifications for App Autoscaler.

View event history

To view all autoscaling events in the past 24 hours, click View More in the Event History section of the Manage Autoscaling pane. You will see the Most Recent event and its corresponding date. The type of event is also shown, such as the Rule Applied, for example.

alt-text=""

Manage App Autoscaler notifications

App Autoscaler emails or texts its event notifications to all users with the Space Developer role by default.

To subscribe or unsubscribe from autoscaling event notifications:

  1. Go to the Manage Notifications page in Ops Manager.

    Important If installed, Notifications Management must be available at https://notifications-ui.SYSTEM-DOMAIN/preferences, where SYSTEM-DOMAIN is your system domain.

  2. Choose which email notifications you want to receive from App Autoscaler. Choices are:

  3. Scaling Down

  4. Manual Scaling Detected
  5. Maximum Instance Limit Reached
  6. Quota Limit Reached
  7. Scaling Up * alt-text=""
check-circle-line exclamation-circle-line close-line
Scroll to top icon