The author | first-generation sequence Ali greetings native technical team

This article is compiled from Serverless Technology Open course. You can get PPT of series of articles by replying to “Getting started” on the background of Serverless public account.

This course introduces how to use the pressure tools and SAE resilience capabilities to deal with the big push practice in an SAE scenario. It mainly consists of three parts: challenges faced by traditional promotion, SAE promotion scheme and rapid pressure test.

Tradition encourages challenge

For a common promotion activity, technical personnel usually start from the following aspects to prepare for it:

  • ** Structure review: ** conducts systematic structure review for participating services;
  • ** Capacity planning: ** Determine SLA indicators of the system by combing architecture, form capacity model, and help business evaluation;
  • ** Performance test: ** Single capacity evaluation of core system, and full link pressure test of core link, can verify the capacity model, find the problems existing in the system;
  • ** Application/database optimization: ** Optimizes detected system problems, such as hot spots, deadlocks, or slow SQL, to ensure that the system can support large volume;
  • ** Prepare capacity expansion plan: ** Through capacity planning and performance testing, a capacity expansion plan that meets the requirements of activities can be determined, which not only ensures services but also reduces costs.
  • ** Emergency plan preparation: ** How to deal with emergencies, such as business downgrade, cutting off non-core logic, or traffic limiting downgrade to ensure core link stability;
  • ** greatly promotes online emergency support: ** Special personnel to respond to problems and implement emergency plans.

To complete the above preparations, the following pain points are often encountered:

  • ** System core full link, lack of global relationship perspective. ** takes a lot of time to sort out dependencies.
  • ** Link upstream and downstream faults and locating faults take time. ** In the process of pressure measurement and online emergency support, summarizing upstream and downstream problems of links takes time to locate problems and lacks quick locating analysis tools.
  • ** Business development iteration fast, need regular pressure test support. ** A large number of repetitive human input, causing a great burden to everyone.
  • ** The reserved resource cost is high and the capacity needs to be expanded frequently. ** Product needs to support automatic elastic expansion, reduce the fixed input of high cost and idle self-built machine room.

SAE promotes solutions

First, SAE is an application-oriented Serverless PaaS platform. In addition to traditional PaaS functions, SAE provides complete full-link monitoring and micro-service management capabilities. With the help of Serverless capabilities, SAE can maximize rapid capacity expansion and reduce manual operation and maintenance costs.

SAE’s solution will be threefold:

  • ** Index visualization: ** with the help of application monitoring ARMS provides rich JVM, full link Tracing, slow SQL and other functions to easily evaluate water level and locate problems;
  • Application high availability: with the help of AHAS traffic limiting and degrading capability, core services can be protected when traffic surges, ensuring that availability does not completely drop to 0.
  • ** Performance manslaughter: ** Simulate single-machine or full-link manslaughter with manslaughter tools such as PTS to verify capacity planning and find application problems.

Rapid pressure test certificate

So how do you get a quick stress test through SAE? Here’s a full presentation:

Step 1: observe the application monitoring indicators and outline the elasticity/pressure measurement/current limiting degradation

By observing application monitoring, you can get a general idea of daily service monitoring indicators. Take a typical e-commerce application as an example.

From the monitoring situation:

  • The application is an HTTP microservice application.
  • The application relies on a large number of HTTP microservice calls and uses a small amount of Redis/MySQL services. It is suitable for single machine and distributed pressure measurement tools to conduct pressure measurement separately.
  • Compared with CPU, MEM, and RT, QPS is more sensitive to services and more suitable for elastic policies.

Step 2: Choose the right pressure measuring tool

You can choose a quick tool or a full-featured pressure measuring tool based on your service requirements.

  • For example, the stand-alone HTTP pressure measurement tools AB and WRK can provide simple and fast pressure measurement methods, but they only support standalone and do not support context.
  • If we need to support WebSocket and normal pressure testing, the cloud product PTS can provide a more complete service at a lower cost than self-built.

Step 3: Configure the SAE elastic scaling policy and AHAS traffic limiting degrade policy

Select appropriate indicators and configure the SAE elastic scaling policy, or configure additional AHAS traffic limiting policies or ARMS alarms.

  • For API types, you can limit traffic for INDICATORS such as API QPS and SQL QPS to ensure that the requests exceed the system water level, fast failover, and reduce the SLA for services within the capacity. Select monitoring indicators QPS and RT to configure elastic rules for elastic scaling.
  • For computing applications, you can select more sensitive indicators, such as CPU and Memory, to expand or shrink applications.

Step 4: Perform pressure test – observe results – optimize code – adjust policy configuration

1) According to the pressure measurement and monitoring results, determine whether it is necessary to optimize the code or adjust the SAE elastic scaling strategy and AHAS flow limiting strategy. 2) Perform the pressure test and check the pressure test result. Failure requests are found. 3) Check monitoring exceptions and find GC exceptions. Optimized JVM parameters through the SAE console. 4) Pressure test again to verify whether the problem is solved. 5) Repeat one or two rounds to solve the major problems found and face the challenge more calmly.

Please click the video course link for detailed demonstration.

Course recommended

In order for more developers to enjoy the dividends brought by Serverless, this time, we gathered 10+ Technical experts in the field of Serverless from Alibaba to create the most suitable Serverless open course for developers to learn and use immediately. Easily embrace the new paradigm of cloud computing – Serverless. Click to free courses: developer.aliyun.com/learning/ro…

Serverless public number, release the latest information of Serverless technology, collect the most complete content of Serverless technology, pay attention to Serverless trend, pay more attention to the confusion and problems encountered in your landing practice.