All Products
Search
Document Center

Elastic Compute Service:Enable public bandwidth for an ECS instance

Last Updated:Jul 10, 2024

This topic provides multiple methods for enabling public bandwidth for an Elastic Compute Service (ECS) instance based on your business requirements. When public bandwidth is enabled for an ECS instance, the instance can access the Internet.

Enable IPv4 public bandwidth

Method

Applicable scenario

Benefit

References

Assign a static public IP address to the ECS instance

This method is suitable for scenarios in which the ECS instance must retain a static public IP address (also known as auto-assigned or system-assigned public IP address) to access the Internet for an extended period of time. Example: The ECS instance provides continuous services.

  • You can assign a static public IP address to an ECS instance when you create the instance. You can also assign a static public IP address to an existing ECS instance.

  • The static IP address is dedicated to the ECS instance and will be unassigned when the instance is released.

  • This method involves a simple operation process and is easy to use.

Associate an elastic IP address (EIP) with the ECS instance

This method is suitable for scenarios in which Internet access requirements or network configuration requirements have temporary or dynamic changes or for scenarios that have other special requirements for access to the Internet. Examples:

  • You need to frequently replace backend servers or redeploy services, such as when you use ECS instances in temporary test environments, development environments, or demo environments.

  • Fast failover is required. When an ECS instance fails, you can quickly disassociate its EIP from it and associate the EIP with a standby instance to redirect traffic to minimize service interruption time.

  • A service is expanded from one instance to multiple instances and the IP address of the service remains unchanged.

  • Multiple services that require independent public IP addresses are deployed on one ECS instance.

  • An EIP is a public IP address that you can separately purchase and own.

  • You can disassociate an EIP from an instance and associate the EIP with another instance.

  • Compared with other methods, this method provides higher operation flexibility and management convenience.

Associate or disassociate an EIP

Associate an Anycast EIP with the ECS instance

This method is suitable for services that are deployed in specific regions outside the Chinese mainland. For more information, see the Components section of the "What is Anycast EIP?" topic.

  • Users access the services over the Internet from the access point locations outside the Chinese mainland. For more information, see the Access point locations section of the "What is Anycast EIP?" topic.

  • Traffic passes through the regular lines of carriers and the global transmission network of Alibaba Cloud.

  • Multiple regions around the world share the same Anycast EIP. User traffic is routed to the nearest access points of the Alibaba Cloud global transmission network to reduce access latency and improve user experience.

  • An Anycast EIP is globally unique. The Anycast EIP can be announced from all access points in an access area and are not limited by regions.

Getting started

Use a NAT gateway to translate network addresses

This method is suitable for scenarios in which multiple ECS instances need to access the Internet or share public bandwidth or for scenarios that have special access requirements. Examples:

  • ECS instances can access external networks while not being exposed to the Internet.

  • Services that only initiate requests to external networks and do not receive requests from the external networks are deployed, such as backend services and databases. In this case, only outbound connections are required.

  • IP address resources are limited. Multiple ECS instances are required to share a public IP address to access the Internet.

  • All ECS instances in a private subnet are required to share the same egress to the Internet.

  • This method provides a centralized and controllable Internet access point, which is the unified Internet traffic egress.

  • This method saves public IP resources. You do not need to assign a public IP address to each ECS instance.

  • This method simplifies the network architecture and allows for centralized management of outbound access policies without the need to separately configure access policies on each ECS instance.

  • ECS instances are not directly exposed to the Internet, which greatly improves security.

Distribute Internet traffic by using Server Load Balancer (SLB)

This method is suitable for large-scale high-concurrency Internet applications, such as red envelope snatching during Chinese New Year, Double 11 promotions, and large-scale online IoT applications.

  • Continuous and stable services are provided for enterprise-level applications to implement high availability, automatic failover, and cross-zone load balancing.

  • Web applications with heavy traffic automatically handle traffic spikes.

You can associate multiple backend servers with an SLB instance in multiple zones to distribute traffic (IPv4 and IPv6) to different backend servers to increase the service throughput of the application system, eliminate single points of failure (SPOFs) in the system, and improve the availability of the application system. For more information, see What is SLB?

Getting Started

Enable IPv6 public bandwidth

Method

Applicable scenario

Benefit

References

Assign an IPv6 address for which public bandwidth is enabled to the ECS instance

This method is suitable for applications or services that support IPv6.

  • Services require communication with IPv6 terminals.

  • IoT and cloud services for large-scale device connections in the future.

Compared with the traditional IPv4 scheme, IPv6 provides more sufficient address space and more advanced network features. Support direct access to the IPv6 Internet.

Manage IPv6 addresses

Distribute Internet traffic by using SLB

This method is suitable for large-scale high-concurrency Internet applications, such as red envelope snatching during Chinese New Year, Double 11 promotions, and large-scale online IoT applications.

  • Continuous and stable services are provided for enterprise-level applications to implement high availability, automatic failover, and cross-zone load balancing.

  • Web applications with heavy traffic automatically handle traffic spikes.

You can associate multiple backend servers with an SLB instance in multiple zones to distribute traffic (IPv4 and IPv6) to different backend servers to increase the service throughput of the application system, eliminate SPOFs in the system, and improve the availability of the application system. For more information, see What is SLB?

Getting Started

References