15
Page 1 of 15

Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Page 1 of 15

Page 2: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 2 of 15

view onlineConfiguration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

OverviewCloud server autoscaling is a new feature in Avi Vantage Platform that enables infrastructure admins, operators, and application developers to use the Avi server autoscaling solution in concert with cloud Auto Scaling groups. Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this feature, more fine-grained scaling policies can be applied, based on Avi Controller-collected metrics and AWS CloudWatch metrics.

Metrics used for server autoscalingMetrics collected from Avi Service Engine, and AWS cloud enable Avi Vantage to take action regarding scale-out or scale-in events. Metrics for services hosted on Avi Service Engine are collected by Avi SEs. Server instance (VM) level metrics are collected from AWS CloudWatch.

Metrics collected by Avi Service Engines * Level 4 metrics * Level 7 metrics * Service Engine metrics * Insight metrics

For the complete list of metrics collected by Avi Vantage, refer to .Metrics List

Metrics collected by AWS

Infrastructure-related metrics for server instances such as CPU usage, network usage, etc., are fetched from CloudWatch by Avi Vantage. The metrics collected from AWS are: * vm_stats.avg_cpu_usage * vm_stats.avg_disk_read * vm_stats.avg_disk_write * vm_stats.avg_disk_io * vm_stats.avg_net_usage

Autoscale policy and autoscale launch configurationThe above-mentioned metrics are fetched for a pool when the pool is enabled for autoscale orchestration. The metrics mentioned in the previous section, are fetched for a pool when the pool is enabled for autoscaling. For server autoscaling to work, the pool must be enabled with an autoscale policy and an autoscale launch configuration.

Autoscale policy

An Autoscale policy is a set of rules to configure and trigger an alert using the above-mentioned metrics. To create or choose an existing autoscale policy, navigate to > and click on the edit icon for the desired pool. Click on Applications Pools

option under to add a new autoscale policy or to use an existing one.AutoScale Policy Settings

Page 3: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 3 of 15

Autoscale launch configuration

An autoscale launch configuration must be associated with the pool for server autoscaling to work.

Setting the value for to true instructs the Autoscale Manager to start orchestrating scale-in or scale-use-external-asg

out activities for the associated pool. The value for flag is set to for the default autoscale launch use-external-asg trueconfiguration ( ).default-autoscalelaunchconfig

To enable the checkbox for , navigate to > , and click on the edit icon for the desired pool. Use External ASG Applications PoolsThe option for is available under tab. Select the drop-down menu for AutoScale Launch Config Settings Autoscale Launch

, provide the desired name, and check the box.Config Use External ASG

Page 4: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 4 of 15

ConfigurationPerform the following steps to enable a pool for server autoscaling:

Navigate to > . Click on and select the required cloud.Applications Pools Create Pool

Page 5: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 5 of 15

Click the drop-down menu for and select .Autoscale Policy Create Autoscale Policy

Page 6: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 6 of 15

On the new Autoscale policy page, provide the desired name, and minimum and maximum instances for the pool.

To create a new alert for server autoscaling, select from the drop-down option in the section.Create Scale Out

Page 7: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 7 of 15

Provide the name, select as , and check the box. For option, select the Metrics Source AutoScale Alert Metrics Occursautoscaling metrics to be used by the pool. In the below example, average CPU usage is selected as the metric.

Page 8: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 8 of 15

Select option for from the drop-down menu and duration for which the metrics statistics is compared with given Comparatorvalue for raising an alert for autoscale. In this example, the autoscale alerts will be generated when average CPU usage exceeds 50% for a duration of 300 seconds.

Page 9: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 9 of 15

Specify alert action. An existing alert action can be selected, for example, generating a medium level system event. Click on .Save

Navigate again to the autoscale policy page, specify a value for and .Cooldown Period Adjustment Step

Page 10: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 10 of 15

Cooldown Period ** ? During this period no new scale-out event is triggered to allow the previous scaleout to complete.

Adjustment Step ? Maximum number of servers to scalein simultaneously. This number is chosen such that target number of servers is always more than or equal to the min_size.

To create a policy for scalein, follow similar steps as mentioned previously for the scale-out policy.

Navigate to > and select the drop-down menu for to create a new Applications Pools AutoScale Launch Configautoscale launch configuration.

Navigate to tab of page, select button and from the drop-down select the Servers Edit Pool AutoScaling Groupsautoscaling group for the pool.

Page 11: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 11 of 15

Click and perform configuration for the section if required, click .Next Advanced Save

Create a virtual service for the configured pool with autoscaling group.

Autoscale activities and eventsAutoscale alerts are generated and pool members scaleout when configured metrics exceed the threshold values. Following are the events generated by the pool for a scale-in and scale-out activity.

Events generated for scale-out activity 1. ? An autoscale scale-out alert is generated by alerts SERVER_AUTOSCALE_OUTmanager. 2. ? The autoscale manager triggers scale-out activity on pool. 3. SERVER_AUTOSCALE_OUT_TRIGGERED

? The pool is updated with the new member. 4. ? An CONFIG_UPDATE AWS_ASG_NOTIFICATION_INSTANCE_ADDEDinstance is added to AWS Auto Scaling Group. 5. ? The autoscale manager triggers SERVER_AUTOSCALE_OUT_COMPLETEthis event when the scale out activity is complete. Indicates scaleout is successfully complete. 6. ? Indicates the SERVER_UPnewly added server is ready to serve traffic.

Navigate to > to check alerts generated for scale-out or scale-in event. Below screenshot is a sample for Templates Eventsreference purpose.

Page 12: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 12 of 15

The alert has details of the newly added instance. In the below screenshot, a AWS_ASG_NOTIFICATION_INSTANCE_ADDEDnew instance having IP 10.148.87.23 is added.

Page 13: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 13 of 15

Events generated for scale-in activity 1. ? An autoscale scale-out alert is generated by alerts SERVER_AUTOSCALE_INmanager. 2. ? The autoscale manager triggers scale in activity on pool. 3. SERVER_AUTOSCALE_IN_TRIGGERED

? The pool was updated and the scaled-in pool member is deleted. 4. CONFIG_UPDATE ? Indicates an instance has been removed from AWS Auto Scaling Group. AWS_ASG_NOTIFICATION_INSTANCE_REMOVED

5. ? The autoscale manager triggers this event when the scale-in activity is complete. SERVER_AUTOSCALE_IN_COMPLETEIndicates scale-in activity is successfully complete.

Refer to the below screenshot for reference purpose.

Page 14: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 14 of 15

SERVER_AUTOSCALE_IN_TRIGGERED event has details of pool member (AWS server instance) that have been terminated and removed from the pool.

AWS_ASG_NOTIFICATION_INSTANCE_REMOVED ? This indicates that a corresponding AWS instance (10.148.177.204) has been removed.

Page 15: Page 1 of 15 - Avi Networks · Auto Scaling groups in the AWS are referred as external autoscaling groups in Avi Vantage since they are an external entity to Avi Vantage. With this

Avi Networks — Technical Reference (18.1)Configuration and Metrics Collection on Avi Vantage for AWS Server Autoscaling

Copyright © 2018 Avi Networks, Inc. Page 15 of 15

Note: Burstable Performance Instance types are not supported for CPU Utilization based autoscaling. Burstable Performance Instance types are AWS instance types with their names starting with T2, i.e., T2.micro, T2.large, etc.