Updated on 2024-04-15 GMT+08:00

VPC Connectivity

You can use EIPs, load balancers, and NAT gateways, to access the Internet as required.

  • Use EIPs to Enable a Small Number of ECSs to Access the Internet

    When only a few ECSs need to access the Internet, you can bind the EIPs to the ECSs. This will provide them with Internet access. You can also dynamically unbind the EIPs from the ECSs and bind them to NAT gateways and load balancers instead, which will also provide Internet access. The process is not complicated.

  • Use NAT Gateways to Enable a Large Number of ECSs to Access the Internet

    When a large number of ECSs need to access the Internet, you can use NAT gateways and EIPs together to reduce management costs. A NAT gateway offers both the SNAT and DNAT functions. SNAT allows multiple ECSs in the same VPC to share one or more EIPs to access the Internet. SNAT prevents the EIPs of ECSs from being exposed to the Internet. SNAT supports up to 1 million concurrent connections and 30,000 new connections. DNAT can implement port-level data forwarding. It maps EIP ports to ECS ports so that the ECSs in a VPC can share the same EIP and bandwidth to provide Internet-accessible services.

  • Use ELB to Connect to the Internet If There Are a Large Number of Concurrent Requests

    In high-concurrency scenarios, such as e-commerce, you can use load balancers to evenly distribute incoming traffic across multiple ECSs, allowing a large number of users to concurrently access your application. ELB is deployed in the cluster mode. It provides fault tolerance for your applications by automatically balancing traffic across multiple AZs. You can also take advantage of deep integration with Auto Scaling (AS), which enables automatic scaling based on service traffic and ensures service stability and reliability.