- Descripción general del servicio
- Guía del usuario
-
Referencia de la API
- Antes de comenzar
- Descripción de la API
- Llamada a APIs
- Pasos iniciales
-
Las API
- Grupos de AS
- Configuraciones de AS
- Instancias
-
Políticas de AS
- Creación de una política de AS
- Creación de una política AS (V2)
- Modificación de una política de AS
- Modificación de una política de AS (V2)
- Consulta de políticas AS
- Consulta de políticas AS (V2)
- Consulta de políticas AS (V2)
- Consulta de una política AS
- Consulta de una política AS (V2)
- Ejecución, habilitación o deshabilitación de una política AS
- Eliminación de una política AS
- Gestión por lotes de políticas AS
- Logs de ejecución de políticas AS
- Logs de acciones de escalado
- Cuotas
- Notificaciones
- Ganchos de ciclo de vida
- Etiquetas
- Consulta de la versión de API
- Ejemplos de aplicación
- Políticas de permisos y acciones admitidas
- Apéndice
- Historial de revisiones
- Pasos iniciales
-
Preguntas frecuentes
-
General
- ¿Cuáles son las restricciones de uso de AS?
- ¿Debo usar AS junto con ELB y Cloud Eye?
- ¿Se factura AS?
- ¿Un cambio brusco en el monitoreo de valores métricos activará una acción de escalado innecesaria?
- ¿Cuántas políticas y configuraciones de AS puedo crear y usar?
- ¿Puede AS escalar automáticamente las vCPU, la memoria y el ancho de banda de los ECS?
- ¿Qué es una cuota de AS?
- ¿Cómo soluciono el error "The key pair does not exist" cuando conecto a una instancia?
- ¿Qué tipos de EIP y anchos de banda compartidos se pueden ajustar por AS?
- ¿Qué tipos de instancias de ECS y de HECS se pueden escalar por AS?
- Si se actualiza el SO de una instancia de ECS en un grupo de AS, ¿puede AS agregar automáticamente instancias con el SO más nuevo durante la próxima acción de escalamiento horizontal?
- ¿Puede AS agregar instancias anuales/mensuales de ECS cuando escala un grupo de AS?
- ¿Puede AS aumentar el ancho de banda según sea necesario?
- Grupo de AS
-
Política de AS
- ¿Cuántas políticas de AS puedo habilitar?
- ¿Cuáles son las condiciones para activar una política de AS basada en alarmas?
- ¿Qué es un período de recuperación y por qué se requiere?
- ¿AS puede escalar la capacidad basada en la supervisión personalizada por Cloud Eye?
- ¿Qué métricas de supervisión de un grupo de AS se verán afectadas si VM Tools no están instaladas en las instancias del grupo?
- ¿Qué puedo hacer si no se habilita una política de AS?
- ¿Cómo instalo el Agent en instancias de un grupo de AS para utilizar las métricas de supervisión del Agent?
-
Instancia
- ¿Cómo puedo evitar que las instancias agregadas manualmente a un grupo de AS se eliminen automáticamente?
- Cuando hay varias variantes incluidas en la configuración de AS de un grupo de AS, ¿en qué orden se seleccionan las variantes durante los eventos de escalamiento horizontal?
- Cuando se quita una instancia de un grupo de AS y se la elimina, ¿se guardan los datos de la aplicación?
- ¿Puedo agregar las instancias anuales/mensuales de ECS a un grupo de AS?
- ¿AS puede eliminar automáticamente las instancias agregadas basadas en una política de AS cuando no son necesarias?
- ¿Cuál es el número esperado de instancias?
- ¿Cómo elimino una instancia de ECS creada en una acción de escalado?
- ¿Se eliminarán las instancias anuales/mensuales de ECS si se vuelven insalubres?
- ¿Cómo manejo las instancias no saludables en un grupo de AS?
- ¿Por qué las instancias de un grupo de AS siguen eliminándose y recreándose cuando fallan en las comprobaciones de estado?
- ¿Cómo puedo evitar que las instancias se eliminen automáticamente de un grupo de AS?
- ¿Por qué se muestra en la lista de ECS una instancia quitada de un grupo de AS y eliminada?
- ¿Necesito vincular una EIP a una instancia antes de agregar manualmente la instancia a un grupo de AS?
- ¿Puedo aplicar las configuraciones de una instancia existente en un grupo de AS a las instancias que se agregarán en el futuro?
- ¿El sistema vinculará una nueva EIP o una existente a una instancia de ECS recién agregada?
-
Otros
- ¿Cómo puedo desplegar automáticamente mi aplicación en una instancia?
- ¿Cómo afecta Cloud-Init al servicio de AS?
- ¿Por qué no puedo usar un archivo de clave para iniciar sesión en un ECS?
- ¿Necesito configurar una EIP en una configuración de AS cuando se ha habilitado un balanceador de carga para un grupo de AS?
- ¿Cómo puedo habilitar la inicialización automática de discos de EVS en las instancias que se han agregado a un grupo de AS durante las acciones de escalado?
-
General
- Actualmente, el contenido no está disponible en el idioma seleccionado. Sugerimos consultar la versión en inglés.
- What's New
- Function Overview
- Best Practices
- SDK Reference
- Videos
- Glossary
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Are ELB and Cloud Eye Mandatory for AS?
- Is AS Billed?
- Does an Abrupt Change on Monitoring Indicator Values Cause an Incorrect Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- Can AS Automatically Scale Up or Down vCPUs, Memory, and Bandwidth of ECSs?
- What Is the AS Quota?
- Why is a message displayed indicating that the key pair does not exist and the operation is discontinued when several users under the same account operate AS resources?
- AS Group
-
AS Policy
- How Many AS Policies Can Be Enabled?
- What Are the Conditions to Trigger an Alarm in the AS Policy?
- What Is a Cooldown Period? Why Is It Required?
- Can AS Scale Capacity Based on Custom Monitoring of Cloud Eye?
- What Will Monitoring Metrics for an AS Group Be Affected If VM Tools Are Not Installed on ECSs?
- What Can I Do If an AS Policy Fails to Be Enabled?
- How Can I Install the Agent Plug-in on the Instances in an AS Group to Use Agent Monitoring Metrics?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Removed Automatically?
- What Are the Sequence of Selecting Flavors in Multi-Flavor AS Configuration?
- Will the Application Data on an Instance Be Retained After the Instance Is Removed from an AS Group and Deleted?
- Can I Add ECSs Charged in Yearly/Monthly Mode?
- Can Instances That Have Been Added Based on an AS Policy Be Automatically Deleted When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Created in a Scaling Action?
- Will a Yearly/Monthly ECS Be Deleted When the ECS Becomes Faulty?
- How Should I Handle Abnormal Instances in an AS Group?
- What Can I Do If Instances in an AS Group Frequently Fail in Health Checks and Are Deleted and Then Created Repeatedly?
- How Do I Prevent ECSs from Being Removed from an AS Group Automatically?
- Why Is an Instance Removed and Deleted from an AS Group Still Displayed in the ECS List?
-
Others
- What Can I Do to Enable My Application to Be Automatically Deployed on an Instance?
- How Does Cloud-Init Affect the AS Service?
- How Can I Run Existing Services on an Instance Newly Added to an AS Group?
- Why Cannot I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When A Load Balancer Has Been Enabled in an AS Group?
- How Can I Enable Automatic Initialization of EVS Disks of Instances That Have Been Added in a Scaling Action to an AS Group?
-
General
- Change History
-
API Reference (ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
API
- AS Groups
- AS Configurations
- Instances in an AS Group
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies
- Querying AS Policies (V2)
- Querying All AS Policies (V2)
- Querying AS Policy Details
- Querying Details of an AS Policy (V2)
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Performing Operations on AS Policies in Batches
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hook
- Tag Management
- API Management
- Permissions Policies and Supported Actions
- Appendix
- Change History
-
User Guide (Paris Regions)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can AS Automatically Delete Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Change History
- API Reference (Paris Regions)
-
User Guide (Kuala Lumpur Region)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Is AS Billed?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- Can AS Automatically Scale Up or Down vCPUs, Memory, and Bandwidth of ECSs?
- What Is an AS Quota?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- Can AS Scale Capacity Based on Custom Monitoring by Cloud Eye?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
- How Do I Install the Agent on Instances in an AS Group to Use Agent Monitoring Metrics?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When There Are Multiple Flavors Included in the AS Configuration of an AS Group, What Order Are the Flavors Selected in During Scale-out Events?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can I Add Yearly/Monthly ECS Instances to an AS Group?
- Can the System Automatically Delete the Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- Will a Yearly/Monthly ECS Instance Be Deleted If It Becomes Unhealthy?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- How Does Cloud-Init Affect the AS Service?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Change History
-
API Reference (Kuala Lumpur Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
APIs
- AS Groups
- AS Configurations
- Instances in an AS Group
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies
- Querying AS Policies (V2)
- Querying All AS Policies (V2)
- Querying AS Policy Details
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Performing Operations on AS Policies in Batches
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hook
- Tag Management
- API Management
- Permissions Policies and Supported Actions
- Appendix
- Change History
-
User Guide (Ankara Region)
- Service Overview
- Best Practices
- Quick Start
- AS Management
-
FAQs
-
General
- What Are Restrictions on Using AS?
- Must I Use AS Together With ELB and Cloud Eye?
- Will an Abrupt Change in Monitoring Metric Values Trigger an Unnecessary Scaling Action?
- How Many AS Policies and AS Configurations Can I Create and Use?
- How Do I Fix the Error "The key pair does not exist" When I Connect to an Instance?
- AS Group
-
AS Policy
- How Many AS Policies Can I Enable?
- What Are the Conditions to Trigger an Alarm-based AS Policy?
- What Is a Cooldown Period and Why Is It Required?
- What Monitoring Metrics for an AS Group Will Be Affected If VM Tools Are Not Installed on the Instances in the Group?
- What Can I Do If an AS Policy Fails to Be Enabled?
-
Instance
- How Do I Prevent Instances Manually Added to an AS Group from Being Automatically Removed?
- When an Instance Is Removed from an AS Group and Deleted, Is the Application Data Saved?
- Can AS Automatically Delete Instances Added Based on an AS Policy When They Are Not Required?
- What Is the Expected Number of Instances?
- How Do I Delete an ECS Instance Created in a Scaling Action?
- How Do I Handle Unhealthy Instances in an AS Group?
- Why Instances in an AS Group Keep Failing Health Checks and Getting Deleted and Recreated?
- How Do I Prevent Instances from Being Automatically Removed from an AS Group?
- Why Is an Instance that Was Removed from an AS Group and Deleted Still Displayed in the ECS List?
-
Others
- How Can I Automatically Deploy My Application on an Instance?
- How Does Cloud-Init Affect the AS Service?
- Why Can't I Use a Key File to Log In to an ECS?
- Do I Need to Configure an EIP in an AS Configuration When a Load Balancer Has Been Enabled for an AS Group?
- How Do I Enable Automatic Initialization of EVS Disks on Instances that Have Been Added to an AS Group During Scaling Actions?
-
General
- Change History
-
API Reference (Ankara Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
-
APIs
- AS Groups
- AS Configurations
- Instances
-
AS Policies
- Creating an AS Policy
- Creating an AS Policy (V2)
- Modifying an AS Policy
- Modifying an AS Policy (V2)
- Querying AS Policies Bound to an AS Group
- Querying AS Policies Bound to a Scaling Resource (V2)
- Querying AS Policies (V2)
- Querying an AS Policy
- Querying an AS Policy (V2)
- Executing, Enabling, or Disabling an AS Policy
- Deleting an AS Policy
- Batch Managing AS Policies
- AS Policy Execution Logs
- Scaling Action Logs
- Quotas
- Notifications
- Lifecycle Hooks
- API Version Query
- Permissions and Supported Actions
- Appendix
- Change History
-
User Guide (ME-Abu Dhabi Region)
Escalando su sitio web dinámicamente
-
Auto Scaling (AS) ajusta automáticamente los recursos informáticos según los requisitos de servicio y las políticas configuradas.
-
Puede especificar configuraciones y políticas de AS basadas en los requisitos de servicio. Estas configuraciones y políticas evitan el ajuste repetido de recursos para los cambios en el servicio y los picos de demanda, así puede reducir los recursos y la mano de obra necesarios.
-
Supongamos que su sitio web de comercio electrónico se ejecuta en ECS ecs-c9b4 en Huawei Cloud. Planea lanzar una gran promoción a las 00:00 de un día determinado. Para responder al pico de demanda durante la actividad, puede tomar las siguientes medidas.
Paso 1: Crear una configuración de AS
1. Inicie sesión en la consola de gestión.
2. Elija Service List > Computing > Auto Scaling.
3. Haga clic en Create AS Configuration.
4. Configure los parámetros y haga clic en Create Now.

Nota
1. Establezca Use existing ECS en Configuration Template y seleccione ECS ecs-c9b4.
2. Especifique Login Mode. En esta práctica, se selecciona Key pair.
3. El Advanced Settings es opcional. Puede inyectar datos de usuario como texto o archivo
1
Consulta de Auto Scaling

2
Creación de una configuración de AS


Ver la imagen
Paso 2: Crear un grupo de AS
1. En la página Instance Scaling, haga clic en Create AS Group.
2. Configure los parámetros y haga clic en Now.

Nota
1. Seleccione la AZ donde reside el ECS ecs-c9b4 para AZ.
2. Establezca Min. Instances y Expected Instances en 0 y Max. Instances en 10.
3. Seleccione la configuración de AS para la que creó AS Configuration.
4. Seleccione la VPC en la que reside el ECS ecs-c9b4 para VPC.
5. Seleccione Elastic load balancer para Load Balancing. El tráfico de acceso se distribuirá automáticamente a todos los ECS disponibles en el grupo de AS.
6. Seleccione ECS health check para Health Check Method.
1
Creación de un grupo de AS (1)

2
Creación de un grupo de AS (2)


Ver la imagen
Paso 3: Agregar una política de AS
1. En la página AS Groups, encuentre el grupo de AS creado y haga clic en View AS Policy.
2. Haga clic en Add AS Policy para agregar una política de AS para el grupo de AS.

Nota
También puede hacer clic en el nombre del grupo de AS, haga clic en la ficha AS Policies y, a continuación, haga clic en Add AS Policy.
1
Consulta de la política de AS

2
Adición de una política de AS


Ver la imagen
Paso 4: Configurar los parámetros de la política de AS
1. Seleccione Alarm para Policy Type.
2. Establezca Trigger Condition en CPU Usage Max. > 90%.
3. Establezca Scaling Action en Add 2 instances.
4. Conserve el valor predeterminado de Cooldown Period.
5. Haga clic en OK.
1
Configuración de parámetros de la política de AS


Ver la imagen
Paso 5: Agregar instancias manualmente
1. Haga clic en el nombre del grupo de AS de destino y haga clic en la ficha Instances.
2. Haga clic en Add, seleccione las instancias que se agregarán y haga clic en OK.

Nota
Puede agregar instancias a un grupo de AS solo si el grupo de AS está habilitado y no tiene ninguna acción de ajuste en curso, y el número de instancias es menor que el número máximo de instancias.
1
Adición manual de instancias a un grupo de AS


Ver la imagen
Paso 6: Consultar los datos de monitoreo
Consultar los datos de monitoreo del grupo de AS. La figura de la derecha sugiere que:
1. El grupo de AS no contiene ninguna instancia después de haber sido creado. Después de cambiar Expected Instances a 2, se desactivó una acción de ajuste y se agregaron dos ECS al grupo de AS.
2. El uso de la CPU se mantiene estable.
El sistema monitorea el uso de la CPU en tiempo real y realiza las acciones de ajuste basadas en los datos de monitoreo y la política configurada para cumplir con los requisitos de servicio y reducir los costos.
1
Consulta de datos de monitoreo


Ver la imagen