Resource reservation events

Updated at:

This topic describes the system event types and details for Elasticity Assurance and Capacity Reservation. This information helps you stay informed of changes to your private pool capacity and respond promptly.

Background information

Elasticity Assurance (EA) and Capacity Reservation (CR) provide capacity assurance for pay-as-you-go instances by reserving resources in a private pool. A private pool may experience capacity failure due to underlying system issues, which makes a portion of the reserved capacity temporarily unavailable for creating instances.

To help you monitor the capacity status of your private pool in real time and respond promptly, ECS provides the following three types of resource reservation system events through CloudMonitor:

  • Private pool status change event: Triggered when the lifecycle state of a private pool changes.

  • Private pool total capacity change effective event: Triggered when the total capacity (TotalCapacity) of a private pool changes.

  • Private pool available capacity failure event: Triggered when a private pool's available capacity becomes unavailable due to a system issue, or when that capacity is restored.

Event type overview

Event name

Event code

Event level

Description

Private pool status change

EcsPrivatePool:StateChange

INFO

The lifecycle state of the private pool changes, for example, from Preparing to Active or Released.

Private pool total capacity change effective

EcsPrivatePool:TotalCapacityChange

INFO

The total capacity of the private pool changes due to an upgrade, a downgrade, or a capacity adjustment that is caused by a system issue.

Private pool available capacity failure

EcsPrivatePool:AvailableCapacityFailure:Executing

CRITICAL

A portion of the available capacity in the private pool has failed due to a system issue and is under repair.

Private pool available capacity recovered

EcsPrivatePool:AvailableCapacityFailure:Executed

CRITICAL

The available capacity of the private pool has been restored.

Private pool status change event

When the lifecycle state of a private pool for an Elasticity Assurance or Capacity Reservation changes, the system sends an EcsPrivatePool:StateChange event.

States

Value

Description

Pending

Initializing. A Capacity Reservation that is scheduled to take effect at a specified time first enters the Pending state.

Preparing

Preparing. A Capacity Reservation that is scheduled to take effect at a specified time is in the Preparing state while resources are being delivered.

Prepared

Ready to take effect. A scheduled Capacity Reservation enters the Prepared state after resources are delivered but before the service becomes active.

Active

Active. The private pool is active and can be used to create instances.

Released

Released. This includes manual release and automatic release upon expiration.

State transition diagram

The following diagram shows the complete lifecycle state transitions for an Elasticity Assurance (EA):

image

Sample event payload

{
  "product": "ecsprivatepool",
  "level": "INFO",
  "resourceId": "acs:ecs:cn-hangzhou:175201********98:ALIYUN::ECS::capacityreservation/crp-bp10dr968********v7",
  "instanceName": "crp-bp10dr968********v7",
  "regionId": "cn-hangzhou",
  "name": "EcsPrivatePool:StateChange",
  "status": "Executed",
  "content": {
    "resourceId": "crp-bp10dr968********v7",
    "eventStatus": "Executed",
    "resourceType": "ALIYUN::ECS::capacityreservation",
    "status": "Pending"
  },
  "id": "ad84c99d-00d0-4a05-9a2a-2d********cf"
}

Parameter

Type

Description

resourceId

String

The ID of the private pool.

eventStatus

String

The status of the event.

resourceType

String

The type of the resource.

status

String

The new status of the private pool after the change.

Private pool total capacity change effective event

The system sends an EcsPrivatePool:TotalCapacityChange event when the total capacity of a private pool for an Elasticity Assurance or Capacity Reservation changes.

Change reasons

Reason type

Description

Example scenario

upgrade

The private pool is upgraded, which increases the total capacity.

You modify an Elasticity Assurance to increase the number of reserved instances from 10 to 20.

downgrade

The private pool is downgraded, which decreases the total capacity.

You modify an Elasticity Assurance to decrease the number of reserved instances from 20 to 10.

systemError

If capacity is lost due to an underlying system failure and cannot be recovered within 36 hours, the system proactively reduces the total capacity.

An underlying hardware issue causes a prolonged capacity outage, and the system automatically adjusts the total capacity.

Sample event payload

{
  "product": "ecsprivatepool",
  "level": "INFO",
  "resourceId": "acs:ecs:cn-hangzhou:1752019********98:ALIYUN::ECS::capacityreservation/crp-bp10dr968********v7",
  "instanceName": "crp-bp10dr968********v7",
  "regionId": "cn-hangzhou",
  "name": "EcsPrivatePool:TotalCapacityChange",
  "status": "Executed",
  "content": {
    "reason": "upgrade",
    "resourceId": "crp-bp10dr968********v7",
    "preTotalCapacity": 1,
    "totalCapacity": 2,
    "eventStatus": "Executed",
    "resourceType": "ALIYUN::ECS::capacityreservation"
  },
  "id": "5ab93918-66a7-4d23-9c16-7b********18"
}

Parameter

Type

Description

reason

String

The reason for the change. Valid values include upgrade, downgrade, and systemError.

resourceId

String

The ID of the private pool.

totalCapacity

Integer

The total capacity (number of instances) after the change.

preTotalCapacity

Integer

The total capacity (number of instances) before the change.

Private pool available capacity failure event

When the available capacity in a private pool becomes unusable due to a system issue, the system sends an EcsPrivatePool:AvailableCapacityFailure event.

Capacity failure

Capacity failure occurs when underlying system issues make unused reserved capacity in a private pool temporarily unavailable for instance creation. During a capacity failure:

  • Existing instances that were created in the private pool are not affected and continue to run.

  • Attempts to create new instances using the failed capacity may be unsuccessful.

  • The system automatically attempts to restore the failed capacity.

Triggers and recovery

Failure trigger conditions

If an attempt to create an instance using a private pool's reserved capacity fails due to insufficient inventory, the system marks the affected capacity as failed. This does not apply to failures caused by other reasons, such as insufficient disk space, quota limits, or configuration errors.

Recovery conditions (recovery occurs if either of the following conditions is met)

  • An instance is successfully created using the reserved capacity of the private pool.

  • No new failed attempts to create instances using the reserved capacity occur within a 15-minute period.

Important

If a capacity failure persists for more than 36 hours, the system proactively reduces the total capacity of the private pool and sends a total capacity change effective event (EcsPrivatePool:TotalCapacityChange). The reason for the change is systemError.

Event statuses

Event code

Event status

Description

AvailableCapacityFailure:Executing

Executing

A portion of the private pool's capacity has failed and is under repair.

AvailableCapacityFailure:Executed

Executed

The available capacity of the private pool has been restored.

Sample event payloads

Capacity failure in progress (Executing)

{
  "product": "ecsprivatepool",
  "resourceId": "acs:ecs:cn-hangzhou:175201********98:ALIYUN::ECS::elasticityassurance/eap-bp15ooknae********u0",
  "level": "CRITICAL",
  "instanceName": "eap-bp15ooknae********u0",
  "regionId": "cn-hangzhou",
  "name": "EcsPrivatePool:AvailableCapacityFailure:Executing",
  "content": {
    "eventStatus": "Executing",
    "failedCapacity": 10,
    "resourceId": "eap-bp15ooknae********u0",
    "resourceType": "ALIYUN::ECS::elasticityassurance",
    "totalCapacity": 13
  },
  "id": "4565c58f-0819-4d96-9d7d-c5********7e"
}

Capacity failure recovered (Executed)

{
  "product": "ecsprivatepool",
  "resourceId": "acs:ecs:cn-hangzhou:175201********98:ALIYUN::ECS::elasticityassurance/eap-bp15ooknae********u0",
  "level": "CRITICAL",
  "instanceName": "eap-bp15ooknae********u0",
  "regionId": "cn-hangzhou",
  "name": "EcsPrivatePool:AvailableCapacityFailure:Executed",
  "content": {
    "eventStatus": "Executed",
    "failedCapacity": 0,
    "resourceId": "eap-bp15ooknae********u0",
    "resourceType": "ALIYUN::ECS::elasticityassurance",
    "totalCapacity": 13
  },
  "id": "411937f4-333c-4bb8-8175-c35********f5"
}

Parameter

Type

Description

failedCapacity

Integer

The amount of failed capacity (number of instances). This value is 0 after recovery.

totalCapacity

Integer

The total capacity of the private pool (number of instances).

eventStatus

String

The status of the event. Executing indicates that the capacity failure is in progress. Executed indicates that the capacity has been recovered.

Capacity metrics

The Elasticity Assurance and Capacity Reservation query APIs return the following capacity metrics, providing a comprehensive view of your private pool's status.

Metric

Description

vCPU metric

TotalCapacity

The total capacity of the private pool, in number of instances.

TotalCapacityVCPU

UsedCapacity

The number of instances created in the private pool.

UsedCapacityVCPU

AvailableCapacity

The capacity that is available for creating instances. This value excludes failed and locked capacity.

AvailableCapacityVCPU

RemainCapacity

The total amount of unused capacity, which includes available, locked, and failed capacity.

RemainCapacityVCPU

LockedCapacity

The amount of locked capacity, for example, during the replenishment period after a bare metal or local disk instance is released.

LockedCapacityVCPU

FailedCapacity

The capacity that has failed due to a system issue.

FailedCapacityVCPU

Calculation rules

The relationships between the metrics are as follows:

  • TotalCapacity = UsedCapacity + RemainCapacity

  • RemainCapacity = AvailableCapacity + LockedCapacity + FailedCapacity

The following table describes the metric values in different scenarios.

Scenario

Metric relationship

Normal operation

RemainCapacity = AvailableCapacity (Both LockedCapacity and FailedCapacity are 0)

Resources are in a locked period after release (for special instance types such as bare metal instances and instances with local disks)

RemainCapacity = AvailableCapacity + LockedCapacity

Capacity failure

AvailableCapacity decreases, and FailedCapacity increases by the same amount.

Capacity changes and failures

The following diagram illustrates typical scenarios for total capacity changes and capacity failure recovery:

image

View resource reservation events

You can view system events for resource reservations in the following ways.

CloudMonitor console

  1. Log on to the System Event page of the CloudMonitor console.

  2. From the ECS Private Resource Pool drop-down list, select ECS Private Resource Pool.

  3. From the Event Name drop-down list, select the event that you want to view, such as Private Pool Status Change.

  4. Set a time range to view event records for the specified period.

API

Call the CloudMonitor DescribeSystemEventAttribute operation to query events. The following example shows a sample request:

aliyun cms DescribeSystemEventAttribute \
  --Product ECS \
  --Name EcsPrivatePool:AvailableCapacityFailure:Executing

Improving reliability

To improve the reliability of your resource reservations, follow these practices:

  • Configure event alerts: Use CloudMonitor to configure alert notifications for the EcsPrivatePool:AvailableCapacityFailure event to receive prompt notifications about capacity failures.

  • Monitor capacity metrics: Periodically call the DescribeElasticityAssurances or DescribeCapacityReservations operation to query the AvailableCapacity and FailedCapacity of your private pools to detect capacity issues early.

  • Design for multi-availability zone redundancy: Purchase Elasticity Assurances or Capacity Reservations in multiple availability zones. If a capacity failure occurs in one availability zone, you can switch your workload to a private pool in another availability zone.

  • Integrate with Auto Scaling: Configure the resource pool policy of your scaling group to Prioritize Private Pool. When the capacity of the specified private pool is insufficient, Auto Scaling automatically attempts to use other available private pools or the public pool.

  • Automate responses: Use EventBridge or Message Service (MNS) to subscribe to capacity failure events and automatically trigger instance creation retries or failover logic.

Related documentation