A developer deploying a high-throughput production application on ECS first configures infrastructure-level networking (security groups, ENIs, public IPs) and then tunes the OS-level network stack (reduce TCP TIME-WAIT, enable SMC acceleration, configure XPS) for optimal performance.
When deploying a high-throughput, latency-sensitive application on Alibaba Cloud, developers must bridge infrastructure-level networking with OS-level kernel tuning. This workflow guides you through provisioning ECS network interfaces and security groups, then optimizing the Alibaba Cloud Linux stack to minimize TCP overhead and maximize packet throughput.
aliyun ecs AttachNetworkInterface --InstanceId i-xxx --NetworkInterfaceId eni-xxx --DeviceIndex 1aliyun ecs AuthorizeSecurityGroup --SecurityGroupId sg-xxx --IpProtocol tcp --PortRange 8000/9000 --SourceCidrIp 10.0.0.0/8aliyun vpc AssociateEipAddress --AllocationId eip-xxx --InstanceId i-xxx --Mode NATsudo sysctl -w net.ipv4.tcp_tw_reuse=1 net.ipv4.tcp_max_tw_buckets=200000 net.ipv4.tcp_fin_timeout=15sudo modprobe smc && sudo sysctl -w net.smc.smc_enabled=1 net.smc.smc_rdma_enabled=1eth1): sudo sh -c 'echo 0-3 > /sys/class/net/eth1/queues/tx-0/xps_cpus'sudo nmcli dev set eth1 managed no && sudo systemctl restart NetworkManagersysctl values to /etc/sysctl.d/99-network-tuning.conf and run sudo sysctl --system.Alibaba Cloud ECS manages the virtualized network boundary: VSwitch routing, ENI attachment, EIP NAT translation, and stateful Security Group packet filtering. Once traffic passes the SG, it enters the Alibaba Cloud Linux kernel, where the tuned TCP stack handles connection multiplexing, SMC bypasses traditional socket overhead via shared memory, and XPS maps transmit queues to specific CPU cores. This layered approach ensures infrastructure routing remains decoupled from host-level packet processing.
aliyun CLI configured with valid AccessKey/SecretKeysudo access to the target instanceeth1 managed causes NetworkManager to overwrite interface configs and reset XPS bindings on reboot.tcp_max_tw_buckets too low or tcp_tw_reuse=1 without net.ipv4.tcp_timestamps=1 can cause connection drops under high concurrency.ecs.g7se); enabling it on unsupported hardware yields fallback to standard TCP.