All Products
Search
Document Center

Elastic Compute Service:Instance overview

Last Updated:Jan 09, 2025

An ECS instance is a virtual server in the cloud that encompasses essential components such as vCPUs, memory, operating systems, networks, and disks. You can create, manage, and release ECS instances via the Alibaba Cloud console, API, or SDK, deploying applications and conducting routine maintenance as with a local server. ECS instances offer more flexible and stable computing and storage capabilities compared to local servers.

Basic configurations of instances

The fundamental resources required by an instance are determined by its basic configurations, which primarily include the following:

Instance types

Instance types specify the core attributes of ECS instances in terms of computing, storage, and network performance. The specific service form of an ECS instance is shaped by combining instance types with configurations such as images, block storage, and networks.

Instance types mainly comprise vCPUs, memory, vGPUs (for GPU types), local storage (for memory-optimized and big data types), physical network cards, network performance (network bandwidth and PPS), and cloud disk performance (cloud disk bandwidth and IOPS). Select an appropriate instance type based on performance requirements, pricing, and workload. For more information, see Instance Type Metrics and Instance Type Selection Guide.

Images

Images contain the necessary information to run instances, including operating systems and initial application data. Alibaba Cloud offers ready-to-use images for Windows Server and popular Linux distributions. You can also create and import custom images to streamline repeated configurations. Moreover, image service providers in the Alibaba Cloud Marketplace provide images with pre-installed environments or applications for specific needs like website creation, application development, and management visualization. For more information, see Image Overview.

Storage

Instances gain storage capabilities through system disks, data disks, and other storage devices. A system disk is essential for installing initial configurations like the operating system when the instance boots up.

Cloud disks serve as both system and data disks. Local disks are exclusive to certain instance types (e.g., local SSD types and big data types) and are solely used as data disks. If an instance requires additional storage for business data, you can enlarge existing cloud disks or attach new ones post-creation. For more information, see Cloud Disk Expansion Guide and Attach Data Disks.

Business data is a critical asset. Cloud disks use a triplicate mechanism to ensure data availability. Nonetheless, it's crucial to back up business data regularly. You can utilize the snapshot feature for cloud disk backups. For local disks, implement data redundancy at the application layer to safeguard data availability.

Network

An elastic network interface (ENI) is a virtual network interface that equips ECS instances in a virtual private cloud (VPC) with network interfaces and IP addresses. Each instance in a VPC comes with a default ENI, enabling communication with other cloud resources or the internet via private or public networks. For more information, see ENI Overview.

Private network communication is facilitated through private IP addresses and domain names. For more information, see VPC Private Network Access.

Public network communication is enabled by granting public access to ECS instances. For more information, see Enable Public Access.

Beyond basic configurations, you can also tailor configurations such as security groups and instance groups. For more information, see Custom Purchase of Instances.

Instance lifecycle

The lifecycle of an instance encompasses the stages from creation to release.

Instance state description

Instance states are categorized into console-based and API-based states, depending on where they can be queried. Console-based states are visible in the console. For specific operations, see View Instance Information. API-based states are retrievable via API calls to DescribeInstanceStatus or DescribeInstances. An API-based state may correspond to multiple console-based states, influenced by factors such as subscription expiration or overdue payments (e.g., the API-based state Stopped).

The table below describes the possible states during an instance's lifecycle.

Note
  • Intermediate states: These states indicate a transition from one state to another, such as Starting.

  • Stable states: These states signify a defined working mode, such as Running or Stopped.

Console-based state

API-based state

State attribute

State description

Pending

Pending

Intermediate state

After an instance is created, it is in this state before it enters the Starting state.

Starting

Starting

Intermediate state

After an instance is created, started, or restarted, it is in this state before it enters the Running state.

Running

Running

Stable state

The instance is in the Running state.

Important

An instance in the Running state only indicates that the instance has been powered on, similar to turning on a computer. However, the operating system of the instance may not necessarily be running. Network services work as expected only when the operating system of the instance is running. You can connect to the instance by using methods such as SSH or Remote Desktop Protocol (RDP). You can check the health status of the instance to determine whether the operating system is running. For more information, see View instance health status.

Expiring soon

Running

Stable state

A subscription instance is running as expected but is about to expire. We recommend that you renew the instance in a timely manner. For more information, see Renewal overview.

Stopping

Stopping

Intermediate state

After you stop or hibernate an instance, it enters this state before it enters the Stopped state.

Stopped

Stopped

Stable state

An instance is in this state when it is created but not started or after it is stopped or hibernated.

Note

After you create an instance in the ECS console or by calling the RunInstances operation, the instance is automatically started. You do not need to manually start the instance.

Expired

Stopped

Stable state

A subscription instance has expired, or a pay-as-you-go instance is stopped due to an overdue payment and is pending release. For information about the retention of instance resources, see Subscription and Pay-as-you-go.

Locked

Stopped

Stable state

An instance is locked due to security risks. You can go to the Security Control page to apply for unlocking.

Pending release

Stopped

Stable state

A subscription instance is pending release after you apply for a refund.

Instance state transitions

The diagram below illustrates the state transition process for instances. For detailed state descriptions, see Instance State Description.

The following list describes common operations for managing instance states:

  • Create an Instance

    After creation, an instance transitions from the Pending state to the Starting state, and finally to the Running state. At this point, you can connect to the instance using tools like SSH, RDP, or session management, depending on the operating system. For specific operations, see Connect to an Instance.

  • Stop an Instance

    Stopping an instance is necessary before performing specific operations such as changing the operating system, modifying the private IP address, or altering the instance type for pay-as-you-go instances. Once stopped, an instance moves to the Stopping state and then to the Stopped state.

    For pay-as-you-go instances stopped in economical mode, computing resources (vCPUs and memory) and static public IP addresses are released, and charges for these resources cease. However, other resources like disks and associated elastic IP addresses (EIPs) are retained, and charges for these continue.

  • Start an Instance

    To utilize an instance in a non-serviceable state, such as Stopped, you must start it. This action transitions the instance to the Starting state and then to the Running state.

  • Restart an Instance

    Instances may require a restart for maintenance, such as applying updates or finalizing configurations. Restarting transitions the instance through the Stopping state, then Starting, and back to Running.

    Restarting may move an instance to a new host. To keep instances on the same host, consider purchasing a dedicated host and associating your instances with it.

  • Release an Instance

    When you no longer require an instance, you can release it to prevent further costs.

    Releasing an instance also frees its ID, static public IP address, system disk, and any data disks set to release with the instance, which cannot be recovered. Data disks not set to release with the instance are detached and retained. If the instance is associated with an EIP, it is disassociated but retained. Exercise caution when releasing instances. To avoid accidental releases, enabling release protection is recommended.

Guidelines

  1. Select an Instance:

    Before purchasing an instance, consider the following:

  2. Purchase an ECS Instance:

    • Quickly Purchase an Instance: This method allows you to swiftly acquire an ECS instance with limited customization options, supporting only certain instance types and images.

    • Custom Purchase of Instances: This approach offers flexibility in selecting configurations such as image types, instance types, storage, bandwidth, and security groups to suit your business needs.

  3. Remotely Connect to an Instance:

  4. Manage Instances:

    For configuration and management of instances, refer to Manage Instances.

  5. Deploy Services:

  6. O&M and Monitoring:

    • For troubleshooting unexpected issues like instance breakdowns, startup failures, or connection problems, use the self-service troubleshooting tool for online diagnostics. For more information, see Self-Service Troubleshooting.

    • Perform periodic and batch O&M operations on instances using CloudOps Orchestration Service (OOS). For more details, see CloudOps Orchestration Service.

  7. Modify ECS Instance Configurations:

    If your ECS instance's current configurations do not meet your business needs, you can modify the instance type, public bandwidth configurations, and billing method for data disks. For more information, see Overview of Scaling Methods.

  8. Release an Instance:

    When an instance is no longer needed, you can release it to avoid incurring additional charges.

    Upon release, the instance's ID, static public IP address, system disk, and data disks set to release with the instance are permanently removed and cannot be restored. Data disks not set to release with the instance are detached and preserved. If the instance is linked to an EIP, the EIP is disassociated but kept. Use caution when releasing instances, and consider enabling release protection to prevent unintended releases. For more information, see Release an Instance.

Security suggestions

Adhering to security best practices can significantly enhance the security of your cloud resources. Consider the following recommendations:

  • Access Control: Utilize Resource Access Management (RAM) to manage user operations and permissions for resources such as instances. For more information, see Identity Management.

  • Network Security: Segregate services with different security levels using VPCs and control inbound and outbound traffic with security groups. Limit public access to instances that require it to reduce the risk of external attacks.

  • Data Security:

    • To maintain data integrity, ECS instances employ triplicate storage technology for a data reliability target of 99.9999999% (nine 9s), secure data erasure mechanisms for complete data deletion, and cyclic redundancy check (CRC) to protect data during transmission and storage. For more information, see Ensure Data Integrity.

    • ECS instances offer a range of security features and solutions for storage, transmission, and runtime to meet data confidentiality needs, including data storage confidentiality, data transmission confidentiality, and data runtime confidentiality. For more information, see Ensure Data Confidentiality During Storage, Transmission, and Computation.

  • Monitoring and Logs: Monitoring and logs are essential for maintaining the availability of ECS resources and the normal operation of your business. Use monitoring services to continuously collect data. Alibaba Cloud offers various monitoring and log auditing services, such as CloudMonitor and Cloud Config, to track resource usage, service performance, and alert you to anomalies in real time.

For additional information on securing instances, see ECS Security.