功能背景
随着业务的不断发展和互联网应用场景的多样化,企业或个人用户在特定时间段内面临网络流量剧增的挑战变得尤为常见。这些流量高峰,如大规模促销活动、热门直播事件、重大新闻发布或季节性数据备份等场景,往往会导致原有带宽瞬间饱和,影响用户体验甚至导致服务短暂不可用。然而,传统网络带宽配置往往在流量骤增的特定时期无法满足需求,而长期维持高带宽配置则费用昂贵,这对于需要在成本控制和网络性能间取得平衡的用户而言,是一大挑战。
为解决上述问题,系统运维管理OOS推出了定时升级临时带宽的功能,此前系统运维管理已经支持了定时升级ECS实例临时带宽功能,针对使用EIP实例带宽的场景,系统运维管理OOS新推出了EIP实例的定时升级带宽功能,该功能旨在提供一种灵活的解决方案,允许用户根据业务需求在特定时间段内临时增加带宽,提前对高峰业务做好规划,以应对预期的流量高峰,而在高峰过后自动降低带宽,以免产生额外成本。
关键特性
- 定时触发:用户可预设具体日期和时间,按计划自动执行带宽升级操作,无需人工介入。
- 自动回退:升级时长结束后,带宽自动恢复至原定标准,避免不必要的费用支出。
- 成本优化:通过只在需要时升级带宽,用户能显著降低运营成本,实现资源的最优化利用。
- 简洁操作:通过云服务平台提供的用户友好界面,几步操作即可完成定时升级设置。
应用场景
电商平台大促
在电商行业的年终大促或特定节假日促销活动期间,网站访问量急剧上升。通过定时升级带宽功能,电商平台可以在活动开始前预设带宽升级,保证顾客访问流畅,提升购物体验和成交率。
在线教育直播课程
在线教育平台在开展大型免费公开课或名师直播时,用户访问量会短时间内激增。利用本功能,平台可确保在直播期间提供足够的网络带宽,保障课程的顺利进行。
游戏发布与更新
游戏公司在发布新游戏或进行大型更新时,玩家集中下载更新包会引起带宽暴涨。通过定时升级带宽,游戏公司可以在此期间提供稳定的下载服务,提升用户体验。
周期性数据备份
对于需要进行大规模数据迁移或备份的企业,利用定时升级带宽功能可以在数据传输期间确保网络速度,缩短备份时间窗口,减少对业务运营的影响。
使用限制
- 仅付费类型为按量付费的实例支持EIP带宽临时升级。
- 仅能临时提升按固定带宽计费的公网带宽,不能提升按使用流量计费的公网带宽。
操作步骤
- 登录OOS控制台。
- 在左侧导航栏找到“自动化任务-公共任务模板”,搜索"ACS-VPC-ScheduleToUpgradeEipBandwidth",点击创建执行。
- 点击下一步: 设置参数,选择定时类型。
这里定时类型有“立即执行、仅在指定时间执行一次、周期性重复执行”三种方式。其中“立即执行”会在创建任务后立即进行重启操作,“仅在指定时间执行一次”只会在您设定的某个时间点执行一次,“周期性重复执行”则会安装一定的规则重复执行,如每一小时执行一次。
- 设置EIP实例所在地域和EIP实例ID、填写需要修改的带宽值及带宽升级时间(最少1小时),点击确定-创建,此时定时升级EIP带宽的任务就创建完成了,当到达设定的时间后就会自动对EIP带宽进行升级,并且在持续设定的时间后降低到原有带宽。
附录
执行流程图
整体执行流程图:
其中升级EIP实例带宽流程
模板
上述步骤中使用的模板“ACS-VPC-ScheduleToUpgradeEipBandwidth”内容如下(模板链接):
FormatVersionOOS-2019-06-01 Description enSchedule to upgrade EIP bandwidth zh-cn定时升级EIP实例临时带宽 name-enACS-VPC-ScheduleToUpgradeEipBandwidth name-zh-cn定时升级EIP实例临时带宽 categories time_trigger Parameters TimerTrigger TypeJson Label enTimerTrigger zh-cn定时类型 AssociationPropertyALIYUNOOSComponentTimerTrigger AssociationPropertyMetadata MinuteInterval30 RegionId TypeString Label enThe id of region zh-cn地域ID AssociationPropertyRegionId Default'{{ ACS::RegionId }}' AllocationId TypeList Label enTargetEIPInstance zh-cn目标EIP实例 Bandwidth Label enBandwidth zh-cn带宽 Description enThe peak bandwidth of EIP needs to be modified. The value is1~500. It is billed based on fixed bandwidth, in Mbps. zh-cn需要修改 EIP 的带宽峰值,取值:1~500,按固定带宽计费,单位为 Mbps。 TypeNumber MinValue1 MaxValue500 DurationHour Label enDurationHour zh-cn带宽升级持续时间 Description zh-cn单位:小时。持续时间最少1小时 enUnitHour. The bandwidth upgrade should last at least 1 hours TypeNumber MinValue1 MaxValue24 Default1 RateControl Label enRateControl zh-cn任务执行的并发比率 TypeJson AssociationPropertyRateControl Default ModeConcurrency MaxErrors0 Concurrency10 OOSAssumeRole Label enThe RAM role to be assumed by OOS zh-cnOOS扮演的RAM角色 TypeString Default'' RamRole'{{ OOSAssumeRole }}' Tasks NameGetEipInstance Description enGet the EIP instance zh-cn获取EIP实例 ActionACSExecuteAPI Properties ServiceVPC APIDescribeEipAddresses Parameters RegionId'{{ RegionId }}' AllocationId Fn::Join ',' '{{ AllocationId }}' Outputs AllocationIds TypeList ValueSelector.EipAddresses.EipAddress.AllocationId NameUpgradeEipAddressBandwidth ActionACSVPCUpgradeEipBandwidth Description enUpgrade EIP instance bandwidth zh-cn升级EIP实例的带宽 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定时设置 enTimer Trigger Configure Parameters RegionId AllocationId Bandwidth DurationHour Label default zh-cn选择实例 enSelect ECS Instances Parameters RateControl OOSAssumeRole Label default zh-cn高级选项 enControl Options
其中Action: ACS::VPC::UpgradeEipBandwidth内容如下:
FormatVersionOOS-2019-06-01 Description enUpgrading the temporary bandwidth of an EIP instance zh-cn升级EIP实例临时带宽 name-enACSVPCUpgradeEipBandwidth name-zh-cn升级EIP实例临时带宽 Parameters RegionId TypeString Label enThe id of region zh-cn地域ID AssociationPropertyRegionId Default'{{ ACS::RegionId }}' AllocationId TypeString Label enTargetEIPInstance zh-cn目标EIP实例 Bandwidth Label enBandwidth zh-cn带宽 Description enUnit:Mbps zh-cn单位:Mbps TypeNumber MinValue1 MaxValue200 Default10 DurationHour Label enDurationHour zh-cn带宽升级持续时间 Description zh-cn单位:小时。持续时间最少1小时 enUnitHour. The bandwidth upgrade should last at least 1 hours TypeNumber MinValue1 Default1 Tasks NameGetEipInstance Description enViews the EIP instances zh-cn获取EIP实例 ActionACSExecuteAPI Properties ServiceVPC APIDescribeEipAddresses Parameters RegionId'{{ RegionId }}' AllocationId'{{ AllocationId }}' Outputs Bandwidth TypeString ValueSelector.EipAddresses.EipAddress.Bandwidth NameUpgradeEipAddressBandwidth ActionACSExecuteAPI Description enUpgrade EIP instance bandwidth zh-cn升级EIP实例的带宽 Properties ServiceVPC APIModifyEipAddressAttribute Parameters RegionId'{{ RegionId }}' AllocationId'{{ AllocationId }}' Bandwidth'{{ Bandwidth }}' NameDurationHour ActionACSSleep Description enBandwidth upgrade duration zh-cn带宽升级持续时间 Properties Duration'{{ DurationHour }}H' NameRecoverEipAddressBandwidth ActionACSExecuteAPI Description enRecover EIP instance bandwidth zh-cn恢复EIP实例的带宽 Properties ServiceVPC APIModifyEipAddressAttribute Parameters RegionId'{{ RegionId }}' AllocationId'{{ AllocationId }}' Bandwidth'{{ GetEipInstance.Bandwidth }}'