1. How many ECS instances can I add to a Server Load Balancer (SLB) instance at most?
You can add up to 200 ECS instances to an SLB instance. An ECS instance can be associated with up to 50 SLB instances.
To guarantee the service stability and efficiency, we recommend that you add ECS instances hosting different applications or performing different tasks on different SLB instances.
2. Can I adjust the number of the backend ECS instances?
You can increase or decrease the number of backend ECS instances in a SLB instance at any time and switch between different ECS instances. Before you perform these operations, make sure health check is enabled and that there is at least one normally running backend ECS instance to avoid service interruption.
3. Can I use different operating systems for the backend ECS instances?
There is no limitation on the operating system used on backend ECS instances as long as applications deployed on the ECS instances are the same and the data is consistent. To facilitate daily management and maintenance, we recommend that you use the same operating system for the backend ECS instances.
4. Can I add the ECS instances in different regions to an SLB instance?
Server Load Balancer does not support cross-region deployment. The ECS instances to be added must belong to the same region as the SLB instance.
5. Why cannot backend ECS instances access SLB?
It is related to the TCP implementation mechanism of SLB. For the Layer-4 SLB service, a backend ECS instance cannot act both as a real server and a client that sends requests to a SLB instance. The returned packets can be transmitted only inside the ECS instance and cannot pass through SLB, so the SLB instance cannot be accessed from backend ECS instances.
6. Is there any impact on the SLB service if an ECS instance has configured a whitelist before being added to a SLB instance?
If an ECS instance has configured a whitelist before it is added to an SLB instance, add the SLB whitelist to the ECS instance, otherwise a 403 error may occur after it is added to the SLB instance.
The SLB IP address to be added is 100.64.0.0/10（100.64.0.0/10 is reserved by Alibaba Cloud, and will not be used by any user, there is no security risk ) .
7. Why there are IP addresses starting with 100 frequently accessing backend ECS instances?
In addition to forwarding external requests to backend ECS instances by using the intranet IP of the system server, the SLB system also accesses the ECS instances to perform health check and monitor service availability.
The IP address range of the SLB system is 100.64.0.0/10（100.64.0.0/10 is reserved by Alibaba Cloud, and will not be used by any user, there is no security risk ) , so there are many IP addresses beginning with 100 access ECS instances.
To guarantee the service availability, you have to configure appropriate access rules for these IP address ranges.
8. Does the backend ECS instance require any special configurations?
No special configuration is required in general.
However, if the ECS instances using Linux systems are added with Layer-4 listeners, make sure the following values in the /etc/sysctl.conf file are zero:
net.ipv4.conf.default.rp_filter = 0 net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.eth0.rp_filter = 0
If the ECS instances belonging to the same intranet IP address range cannot communicate with each other, check whether the following parameters are correct. Run sysctl -p to update the configuration after you make any changes.
net.ipv4.conf.default.arp_announce =2 net.ipv4.conf.all.arp_announce =2
9. Can I deploy multiple sites on the same group of ECS instances and add them to one SLB instance?
Yes. For more information, see SLB + ECS multi-site deployment.
Each SLB instance supports adding up to 50 listeners and each listener corresponds to an application deployed on backend ECS instances. To achieve this, you can configure different host headers for different applications on the backend ECS instances.
10. What is the purpose of setting weights for ECS instances?
An ECS instance with a higher weight value receives more requests. You can configure different weights for different ECS instances based on the external service capabilities and demand.
It is the same if the weights for ECS instance A and ECS instance B are both configured to the same value, for example, 100 or 50. Traffic is evenly distributed to instance A and instance B when the two instances are both in normal status. However, if the weight for the ECS instance A is set to 10 but the weight for the ECS instance B is set to 100, instance A receives 10/(10+100) percent of the traffic and instance B receives 100/(10+100) percent of the traffic.
If you have enabled session persistence, requests may not be evenly distributed to the backend ECS instances. We recommend temporarily disabling session persistence to check if the problem still exists.
When requests are unevenly distributed to backend ECS instances, troubleshoot as follows:
- Obtain the total number of access logs of web services deployed on the backend ECS instances in a certain time period.
Use the following methods to get the access logs:
- Nginx and Apache: open log directory /access.log.
- IIS: Open the IIS management page, place the cursor over the site for which you want to enable access logging, right-click and choose Properties, click the Website tab, and click Enable Logging.
- Compare the number of the logs for multiple ECS instances according to the SLB configurations.
If session persistence is enabled, you must strip the access logs from the same IP. If the SLB configures a weight, calculate whether the proportion of access logs is normal according to the weight.
11. Why are responses returned by SLB compressed while the ECS instance does not configure compression?
The possible reason is that the client web browser supports compression. You can disable Gzip function when creating listeners on the console or use TCP listeners instead.
12. Is chunked transfer encoding supported if backend ECS instances use HTTP1.0?