AWS CDK AutoscalingGroup计划会自动适应夏季和冬季?
当通过CDK添加时间表时,我可以选择 timezone :
declare autoscalingGroup: IAutoscalingGroup;
autoscalingGroup.scaleOnSchedule(
"LogicalId",
{
minCapacity: 150,
maxCapacity: 150,
schedule: Schedule.expression("0 18 * * *"),
timeZone: "Europe/Berlin"
}
);
上面的代码 Mean nee 是什么?在夏季,我会在16.00 UTC时自动降低150个实例,但在冬季为17.00 UTC?
href =“ https://docs.aws.amazon.com/awscloudformation/latest/userguide/aws-resource-asource-as-scheduledaction.html#cfn-as as-as-as-Scheduledaction timezone” rel =“ nofollow noreferrer“> https://docs.aws.amazon.com/awscloudformation/latest/userguide/aws-resource-as-as-scheduledaction.html#cfn-as-as-as-scheduledactionalaction time timezone
When adding a schedule to an autoscaling group via CDK, I can select the timezone:
declare autoscalingGroup: IAutoscalingGroup;
autoscalingGroup.scaleOnSchedule(
"LogicalId",
{
minCapacity: 150,
maxCapacity: 150,
schedule: Schedule.expression("0 18 * * *"),
timeZone: "Europe/Berlin"
}
);
What does the code above mean? Will I automatically scale down to 150 instances at 16.00 UTC during summer, but at 17.00 UTC during winter?
CDK reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.BasicScheduledActionProps.html
Cloudformation reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-scheduledaction.html#cfn-as-scheduledaction-timezone
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的 - 完全是指。 UTC是恒定的,与CEST不同,日光储蓄不受影响。
因此,由于您使用了CEST时区,因此您的缩放时间将在您正确说明的夏季和冬季发生在不同的UTC时代。
Yes -- it means exactly that. UTC is constant and is unaffected by daylight savings unlike CEST.
So because you've used a CEST timezone, your scaling will happen at different UTC times in summer and winter as you've correctly stated.