All Products
Search
Document Center

CloudOps Orchestration Service:Schedule temporary bandwidth upgrades for EIPs

Last Updated:Sep 11, 2024

This topic describes how to use CloudOps Orchestration Service (OOS) to plan and schedule temporary bandwidth upgrades for elastic IP addresses (EIPs) in advance. This ensures the performance and stability of applications during critical periods and reduces costs.

Background information

As business grows and Internet scenarios become more diversified, enterprises and individual users more commonly encounter significant spikes in network traffic within a specific period of time. Such spikes, driven by events such as large-scale promotional campaigns, popular live streaming events, major news announcements, or seasonal data backup activities, can quickly saturate existing bandwidth. This adversely affects user experience and potentially causes service interruptions. Traditional network bandwidth configurations often fail to handle these sudden spikes, and maintaining high bandwidth levels over the long term is prohibitively expensive. If you seek to balance cost with network performance, you may face a significant challenge.

To resolve the preceding issues, OOS introduces the feature of scheduled temporary bandwidth upgrades. OOS already supports temporary bandwidth upgrades. OOS now offers the scheduled bandwidth upgrade feature specifically for scenarios in which EIPs are used. This feature provides a flexible solution that allows you to temporarily increase bandwidth based on business requirements during a specific period of time in anticipation of business peaks. This enables proactive planning for expected traffic surges and automatically restores bandwidth to the original value after the peak period, thus reducing unnecessary additional costs.

Benefits

  • Scheduled triggering: You can preset specific dates and time for automatic bandwidth upgrades to be executed based on the schedule, which eliminates the need for manual intervention.

  • Automatic reversion: After the upgrade duration elapses, the bandwidth automatically reverts to the original value to reduce unnecessary costs.

  • Cost optimization: You can upgrade bandwidth based on your business requirements to significantly reduce operational costs and maximize resource utilization.

  • Simplified operation: The OOS console provides a user-friendly GUI that allows you to configure scheduled bandwidth upgrades with only a few steps.

Scenarios

Big sales promotions on e-commerce platforms

During e-commerce industry promotions at year-end and on specific holidays, website traffic dramatically surges. By using the scheduled bandwidth upgrade feature, e-commerce platforms can preset bandwidth upgrades ahead of time to ensure smooth customer access, thereby improving the shopping experience and increasing conversion rates.

Live classes on online education platforms

Online education platforms experience a rapid increase in user traffic during large-scale free public classes or live sessions with renowned instructors. By using the scheduled bandwidth upgrade feature, online education platforms can ensure that adequate network bandwidth is available during live streaming events, thereby facilitating the smooth delivery of courses.

Game releases and updates

When gaming companies launch new titles or roll out major updates, a concentrated influx of players downloading the update packages can cause a significant bandwidth spike. By using the scheduled bandwidth upgrade feature, gaming companies can offer stable download services during these critical periods, thereby improving the player experience.

Periodic data backup

For enterprises that need to undertake large-scale data migration or backups, using the scheduled bandwidth upgrade feature can ensure consistent network speed during the data transfer period. This helps shorten the backup time window and minimize the impact on business operations.

Note
  1. Only pay-as-you-go EIPs support temporary bandwidth upgrades.

  2. You can temporarily upgrade only the public bandwidth that is charged by using the pay-by-bandwidth billing method. You cannot temporarily upgrade the public bandwidth that is charged by using the pay-by-data-transfer billing method.

Procedure

  1. Log on to the CloudOps Orchestration Service console.

  2. In the left-side navigation pane, choose Automated Task > Public Template. On the Public Template page, enter ACS-VPC-ScheduleToUpgradeEipBandwidth in the search box. Find the ACS-VPC-ScheduleToUpgradeEipBandwidth template and click Create Execution.image.png

  1. On the Create Task page, click Next Step: Parameter Settings. In the Parameter Settings step, configure the TimerTrigger parameter in the Timer Trigger Configure section. You can set the TimerTrigger parameter to Execute Now, Executed Once at the Specified Time, or Executed Periodically. If you select Execute Now, the scheduled bandwidth upgrade task is executed immediately after it is created. If you select Executed Once at the Specified Time, the scheduled bandwidth upgrade task is executed only once at the specified point in time. If you select Executed Periodically, the scheduled bandwidth upgrade task is periodically executed based on the scheduled time. For example, you can specify that the scheduled bandwidth upgrade task is executed on an hourly basis.image.png

  2. In the Select ECS Instances section, specify the ID of the region in which your EIP resides and the ID of the EIP, enter the bandwidth and bandwidth upgrade duration, and then click Next Step: OK. In the OK step, click Create. The minimum bandwidth upgrade duration is 1 hour. The scheduled bandwidth upgrade task is created. When the specified time arrives, the bandwidth of the EIP is automatically upgraded. After the upgrade duration elapses, the bandwidth automatically reverts to the original value.image.png

Appendix

Execution flowchart

The following figure shows the entire execution process.

image.png

The following figure shows the process of upgrading the bandwidth of an EIP.

image.png

Template

The following sample code shows the content of the ACS-VPC-ScheduleToUpgradeEipBandwidth template that is used in this example:

FormatVersion: OOS-2019-06-01
Description:
  en: Schedule to upgrade EIP bandwidth
  zh-cn: the description in Chinese
  name-en: ACS-VPC-ScheduleToUpgradeEipBandwidth
  name-zh-cn: the description in Chinese
  categories:
    - time_trigger
Parameters:
  TimerTrigger:
    Type: Json
    Label:
      en: TimerTrigger
      zh-cn: the description in Chinese
    AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
    AssociationPropertyMetadata:
      MinuteInterval: 30
  RegionId:
    Type: String
    Label:
      en: The id of region
      zh-cn: the description in Chinese
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  AllocationId:
    Type: List
    Label:
      en: TargetEIPInstance
      zh-cn: the description in Chinese
  Bandwidth:
    Label:
      en: Bandwidth
      zh-cn: the description in Chinese
    Description:
      en: The peak bandwidth of EIP needs to be modified. The value is:1~500. It is billed based on fixed bandwidth, in Mbps.
      zh-cn: the description in Chinese 
    Type: Number
    MinValue: 1
    MaxValue: 500
  DurationHour:
    Label:
      en: DurationHour
      zh-cn: the description in Chinese
    Description:
      zh-cn: the description in Chinese  
      en: Unit:Hour. The bandwidth upgrade should last at least 1 hours
    Type: Number
    MinValue: 1
    MaxValue: 24
    Default: 1
  RateControl:
    Label:
      en: RateControl
      zh-cn: the description in Chinese
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: The RAM role to be assumed by OOS
      zh-cn: the description in Chinese
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: GetEipInstance
    Description:
      en: Get the EIP instance
      zh-cn: the description in Chinese
    Action: ACS::ExecuteAPI
    Properties:
      Service: VPC
      API: DescribeEipAddresses
      Parameters:
        RegionId: '{{ RegionId }}'
        AllocationId:
          Fn::Join:
            - ','
            - '{{ AllocationId }}'
    Outputs:
      AllocationIds:
        Type: List
        ValueSelector: .EipAddresses.EipAddress[].AllocationId
  - Name: UpgradeEipAddressBandwidth
    Action: ACS::VPC::UpgradeEipBandwidth
    Description:
      en: Upgrade EIP instance bandwidth
      zh-cn: the description in Chinese
    Properties:
      RegionId: '{{ RegionId }}'
      AllocationId: '{{ ACS::TaskLoopItem }}'
      Bandwidth: '{{ Bandwidth }}'
      DurationHour: '{{ DurationHour }}'
    Loop:
      RateControl: '{{ RateControl }}'
      Items: '{{ GetEipInstance.AllocationIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - TimerTrigger
        Label:
          default:
            zh-cn: the description in Chinese
            en: Timer Trigger Configure
      - Parameters:
          - RegionId
          - AllocationId
          - Bandwidth
          - DurationHour
        Label:
          default:
            zh-cn: the description in Chinese
            en: Select ECS Instances
      - Parameters:
          - RateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: the description in Chinese
            en: Control Options

The following sample code shows the content of Action: ACS::VPC::UpgradeEipBandwidth:

FormatVersion: OOS-2019-06-01
Description:
  en: Upgrading the temporary bandwidth of an EIP instance
  zh-cn: the description in Chinese
  name-en: ACS::VPC::UpgradeEipBandwidth
  name-zh-cn: the description in Chinese
Parameters:
  RegionId:
    Type: String
    Label:
      en: The id of region
      zh-cn: the description in Chinese
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  AllocationId:
    Type: String
    Label:
      en: TargetEIPInstance
      zh-cn: the description in Chinese
  Bandwidth:
    Label:
      en: Bandwidth
      zh-cn: the description in Chinese
    Description:
      en: Unit: Mbit/s
      zh-cn: the description in Chinese
    Type: Number
    MinValue: 1
    MaxValue: 200
    Default: 10
  DurationHour:
    Label:
      en: DurationHour
      zh-cn: the description in Chinese
    Description:
      zh-cn: the description in Chinese  
      en: Unit:Hour. The bandwidth upgrade should last at least 1 hours
    Type: Number
    MinValue: 1
    Default: 1
Tasks:
- Name: GetEipInstance
  Description:
    en: Views the EIP instances
    zh-cn: the description in Chinese
  Action: ACS::ExecuteAPI
  Properties:
    Service: VPC
    API: DescribeEipAddresses
    Parameters:
      RegionId: '{{ RegionId }}'
      AllocationId: '{{ AllocationId }}'
  Outputs:
    Bandwidth:
      Type: String
      ValueSelector: .EipAddresses.EipAddress[].Bandwidth
- Name: UpgradeEipAddressBandwidth
  Action: ACS::ExecuteAPI
  Description:
    en: Upgrade EIP instance bandwidth
    zh-cn: the description in Chinese
  Properties:
    Service: VPC
    API: ModifyEipAddressAttribute
    Parameters:
      RegionId: '{{ RegionId }}'
      AllocationId: '{{ AllocationId }}'
      Bandwidth: '{{ Bandwidth }}'
- Name: DurationHour
  Action: ACS::Sleep
  Description:
    en: Bandwidth upgrade duration
    zh-cn: the description in Chinese
  Properties:
    Duration: '{{ DurationHour }}H'
- Name: RecoverEipAddressBandwidth
  Action: ACS::ExecuteAPI
  Description:
    en: Recover EIP instance bandwidth
    zh-cn: the description in Chinese
  Properties:
    Service: VPC
    API: ModifyEipAddressAttribute
    Parameters:
      RegionId: '{{ RegionId }}'
      AllocationId: '{{ AllocationId }}'
      Bandwidth: '{{ GetEipInstance.Bandwidth }}'