Abstract:Autoscaling is a key feature of cloud computing. It can expand computing resources in time according to application workload and achieve load balancing under high concurrent requests. Container-based micro-services should also have the function of autoscaling so as to have stably performance under different workloads. The elastic scaling algorithm of Kubernetes, a widely used container layout tool, has unsatifactory flexibility. Pod will expand frequently to deal with sudden traffic, and the scaling degree can not meet the current load requirements, which will make a system instability. To solve this problem, an automatic scaling mechanism is proposed, which combines the response expansion with the elastic scaling tolerance, and ensures the reliability of the system. Our method greatly improves the flexibility of the system, and is also competent when facing high application load. Experiments results show that when the system meet with heavy traffic and high concurrent requests, the failure request rate can decrease by 97.83% after carrying out the proposed method. So our method can ensure the stability of the system and realizes the load balancing of the application well.