ECS scheduled maintenance windows

Updated at:

An ECS scheduled maintenance window is an Alibaba Cloud feature that lets you designate off-peak business hours as the system maintenance period for ECS instances. Running O&M operations, such as instance restarts and instance redeployments, within these windows reduces business impact and improves system stability.

Usage notes

  • When you use ECS scheduled maintenance windows, avoid also configuring maintenance time windows for instance maintenance attributes.

  • The start and end times of an ECS scheduled maintenance window are in UTC. Beijing time is UTC+8 (8 hours ahead of UTC). Convert Beijing time to UTC before you configure the window. Convert your local time to UTC before you configure the window. When the recurrence frequency is Every, 00:00 on Sunday is the earliest time.

  • The total maintainable duration configured for a single ECS scheduled maintenance window must be at least 2 hours.

  • Each ECS scheduled maintenance window can be associated with only one target type: all ECS instances, resource tags, or a resource group ID.

  • To reserve a period between the publication and execution of scheduled O&M events, set a minimum interval duration for the window. Valid values: 1 to 48 hours. You can set the minimum interval duration only when the supported maintenance action is Restart Instance or Redeploy Instance. This configuration item is unavailable when you select Performance Fluctuation, No Restart.

How ECS scheduled maintenance windows take effect

  • Events run according to an ECS scheduled maintenance window: When the planned execution period of a scheduled O&M event matches an ECS scheduled maintenance window, the event runs according to that window.

    image
  • An ECS scheduled maintenance window does not take effect: When the execution period of a scheduled O&M event does not match an ECS scheduled maintenance window, the event runs as originally scheduled. (Recommended) Configure more maintainable time windows.

    image

How the minimum interval duration works

The minimum interval duration is the minimum time between the publication time and the planned execution time of scheduled O&M events that match the maintenance action setting of an ECS scheduled maintenance window, for instances within the scope of that window.

After you set a minimum interval duration, the system searches for a suitable ECS scheduled maintenance window for each matching scheduled O&M event within the following period: Event publication time + Minimum interval duration to Event publication time + Minimum interval duration + 48 hours.

  • A suitable O&M window is found: The planned execution time of the event falls within that O&M window.

  • No suitable O&M window is found: Neither the ECS scheduled maintenance window nor the minimum interval duration takes effect, and the planned execution time of the event is approximately the event publication time + 48 hours.

Example

Assume that the minimum interval duration is set to 5 hours, October 1 is a Monday, and two instances have the following SystemMaintenance.Reboot event information:

Instance

Event publication time

Time range for searching for an O&M window

Instance A

October 1, 10:00

October 1, 15:00 to October 3, 15:00

Instance B

October 1, 18:00

October 1, 23:00 to October 3, 23:00

The following table lists the execution times of the two events under different O&M window recurrence frequencies.

Scenario

O&M window recurrence frequency

Instance A

Instance B

Scenario 1

Every day, 01:00 to 04:00

The event matches the O&M window on October 2 from 01:00 to 04:00, and the instance restarts during that period.

The event matches the O&M window on October 2 from 01:00 to 04:00, and the instance restarts during that period.

Scenario 2

Every Wednesday, 18:00 to 24:00 (October 3 is a Wednesday)

The search period ends at 15:00 on October 3 and no O&M window matches. The instance restarts at 10:00 on October 3 (publication time + 48 hours).

The event matches the O&M window on October 3 from 18:00 to 24:00, and the instance restarts during that period.

Scenario 3

Every Thursday, 01:00 to 04:00 (October 4 is a Thursday)

No O&M window matches within the search period. Neither the O&M window nor the minimum interval duration takes effect, and the instance restarts at 10:00 on October 3 (publication time + 48 hours).

No O&M window matches within the search period. Neither the O&M window nor the minimum interval duration takes effect, and the instance restarts at 18:00 on October 3 (publication time + 48 hours).

Note

For clarity, all times in this example use the same time zone. When you configure an O&M window, set the start and end times in UTC.

Maintenance actions of ECS scheduled maintenance windows

ECS scheduled maintenance windows support three maintenance actions: Restart Instance, Redeploy Instance, and Performance Fluctuation, No Restart. A high-priority maintenance action (Instance Redeployment Due to System Maintenance) overrides a low-priority maintenance action (Instance Restart Due to System Maintenance). When an ECS scheduled maintenance window that supports instance redeployment takes effect, SystemMaintenance.Reboot events in the same time range are executed together in that window.

Note

Performance Fluctuation, No Restart has the least impact on your business. It applies when instances experience only short-term performance fluctuations during system maintenance and do not require a restart. After you select this maintenance action, the corresponding O&M events run within the window and do not trigger instance restarts or redeployments.

By default, scheduled O&M events for ECS expire after 48 hours. To change the expiration to 7 days, submit a ticket.

Maintenance action selected

Instance type

O&M events affected by the maintenance window

Instance maintenance method

Restart Instance

All instances

SystemMaintenance.Reboot (Instance Restart Due to System Maintenance)

Restart Instance.

Redeploy Instance

Note

If the selected instance scope includes both instances without local disks and instances with local disks, select a maintenance action based on the business requirements of the instances with local disks.

Instances without local disks

SystemMaintenance.Reboot (Instance Restart Due to System Maintenance)

Restart Instance.

Instances with local disks

(d series, i series, and other series)

SystemMaintenance.Reboot (Instance Restart Due to System Maintenance)

Restart Instance.

SystemMaintenance.Redeploy (Instance Redeployment Due to System Maintenance)

After instances are redeployed, data on local disks is lost. To ensure data security, back up important data in advance or migrate it to cloud disks such as ESSDs and standard SSDs.

Note

You must authorize SystemMaintenance.Redeploy events before they can match a scheduled maintenance window. Authorize them in either of the following ways:

  • Set the instance maintenance attribute to AutoRedeploy.

  • Respond to SystemMaintenance.Redeploy:Inquiring in the console or through an API operation.

Create an ECS scheduled maintenance window

  1. Go to ECS console - Events.

  2. In the left-side navigation pane of the Event page, click Scheduled Maintenance Windows.

  3. Click Create Scheduled Maintenance Window.

  4. In the Create Scheduled Maintenance Window dialog box, configure the following parameters.

    Parameter

    Description

    Example

    Window Name

    The window name must be 2 to 200 characters in length. It supports characters in the Unicode Letter category, including English and Chinese characters, and digits. It can contain colons (:), underscores (_), periods (.), or hyphens (-).

    • (Recommended) Limit the window name to 2 to 64 characters so that it displays completely in the console.

    • Duplicate names are allowed. For easier management, use a unique identifier.

    Maintainable window for Redis workloads

    Resource Scope

    You can precisely define the target ECS instances by selecting all instances, a specified resource group, or specified instance tags. Each ECS scheduled maintenance window can be associated with only one target type.

    • All: All instances in the account.

    • By Resource Group: Select all instances in a specified resource group by resource group ID or name.

    • By Instance Tags: Select resources by tag. This setting takes effect in all regions.

    All

    Recurrence Frequency

    You can select a weekly or daily recurrence frequency.

    • Every: Repeat the time window weekly.

    • Every Day: Repeat the time window daily.

    Every

    Time Range

    You can configure maintenance time ranges and define multiple time ranges in one ECS scheduled maintenance window.

    Note

    Depending on the selected recurrence frequency, you can configure multiple maintenance periods. Each period must be at least 2 hours long.

    Important

    The start and end times are in Coordinated Universal Time (UTC), not Beijing time. Convert Beijing time to UTC before you configure the window. not your local time. Convert your local time to UTC before you configure the window.

    Beijing time is UTC+8, which is 8 hours ahead of UTC. For example, if you want the maintenance window to run from 02:00 to 06:00 Beijing time, set it to 18:00 to 22:00 UTC on the previous day.

    • Every:

      • Start time: Monday 00:00 (UTC)

      • End time: Monday 04:00 (UTC)

    • Every day:

      • Start time: 00:00 (UTC)

      • End time: 04:00 (UTC)

    Maintenance Action

    You can select the event response methods that are acceptable within an ECS scheduled maintenance window.

    • Restart Instance: The maintenance action that instances can perform within the ECS scheduled maintenance window. Only SystemMaintenance.Reboot (Instance Restart Due to System Maintenance) is supported.

    • Redeploy Instance: Instances can be redeployed or restarted within the ECS scheduled maintenance window. Only SystemMaintenance.Reboot (Instance Restart Due to System Maintenance) and SystemMaintenance.Redeploy (Instance Redeployment Due to System Maintenance) are supported.

    • Performance Fluctuation, No Restart: Instances perform only maintenance actions that do not involve a restart within the ECS scheduled maintenance window. Short-term performance fluctuations may occur during system maintenance, but no instance restart or redeployment is triggered. This option has the least business impact and suits scenarios that require high business continuity and can tolerate brief performance fluctuations.

    Restart Instance

    Minimum Interval Duration

    For instances within the scope of an ECS scheduled maintenance window, the minimum interval between the publication time and the planned execution time of scheduled O&M events that match the maintenance action setting of the window. Valid values: 1 to 48 hours. Default value: 1 hour. This configuration item is in the More collapsible section of the dialog box, which you must expand before you configure it. The section is displayed only when the supported maintenance action is Restart Instance or Redeploy Instance. When you select Performance Fluctuation, No Restart, the More section is not displayed, and you cannot set the minimum interval duration.

    After you set this value, the system searches for a suitable O&M window for the event within the range of event publication time + minimum interval duration to event publication time + minimum interval duration + 48 hours. If no window is found, neither the ECS scheduled maintenance window nor the minimum interval duration takes effect. For details and examples, see How the minimum interval duration works above.

    Note

    The minimum interval duration applies only to scheduled O&M events. Emergency O&M events, such as security vulnerability fixes, are not subject to this interval.

    48 hours

    Effectiveness

    Specifies whether the current scheduled maintenance window takes effect.

    Turn on: The current scheduled maintenance window takes effect.

    Turn off: The current scheduled maintenance window does not take effect.

    Turn on

  5. After you complete the configuration, click OK to create the window.

Manage ECS scheduled maintenance windows

  • View scheduled maintenance windows: You can view existing scheduled maintenance windows directly on the Scheduled Maintenance Windows page. You can also click Actions and then Details to view the details of a specific ECS scheduled maintenance window.

    On the ECS scheduled maintenance window management page, click Create Maintenance Window to create a window. The maintenance window list includes columns for Maintenance Window ID/Name, Effectiveness, Recurrence Frequency, Instance Scope, and Modification Time.

  • Modify scheduled maintenance windows: If your business requirements change, for example, if a maintenance period conflicts with a business peak or you need to extend the maintenance window, click Actions and then Modify to update the ECS scheduled maintenance window configuration so that it matches your current business activity.

    You can modify the following configuration items in the dialog box:

    • Window Name

    • Recurrence Frequency (for example, Every Day)

    • Time Range

    • Maintenance Action

    • Minimum Interval Duration (modifiable only when the supported maintenance action is Restart Instance or Redeploy Instance)

    • Effectiveness

    Note

    Resource Scope cannot be modified after creation. To change the selected instance scope, delete the original maintenance window and create a new one.

  • Delete scheduled maintenance windows: When the business associated with a maintenance window has stopped running, for example, after a campaign ends or a project goes offline, or when multiple maintenance windows overlap in time, delete the redundant windows for centralized management. Click Actions and then Delete. In the confirmation dialog box, click OK to delete a single ECS scheduled maintenance window.