Hot on the whole network, performance test-full link pressure test summary, from demand to actual combat...


foreword

Process Map

Please add a picture description

grooming stage

System service sorting
Full-link stress testing is a very complex project, which involves multiple services. Sorting out the entire business system and confirming the upstream, downstream and scope of traffic transmission is the first thing to do.

Core link sorting
What is a core link?
Looking at it now, it is still a difficult choice. When sorting out the core link, the pressure testing team mainly evaluates from the following aspects:
1) Whether it is a high-frequency access business;
2) Whether it is a core link with strong dependence;
3) Whether it directly affects the transaction business of production;
4) Reference The actual QPS index of production is the dimension;

Sorting out external dependencies
After determining the core link, it is necessary to sort out its external dependencies (such as third-party payment). Since the full-link stress test is performed in the production environment, it is necessary to perform mock processing on external dependencies to avoid impacting production services.

Middleware sorting
In order to avoid the impact of pressure measurement traffic on production and the generation of dirty data, it is necessary to sort out the middleware involved in the entire traffic transmission process, so that pressure measurement traffic can be transparently transmitted to the shadow database.

When requesting the gateway interface for stress test traffic simulation, include: x-infr-flowtype=PT in the header, and the routing logic of each middleware is as follows:

mysql: shadow library;
redis: shadow key, prefix ptshadow_;
mongodb: shadow collection, prefix ptshadow_;
kafka: regardless of topic, downstream routing will perform corresponding routing;
rocketmq: regardless of topic, downstream routing will perform corresponding routing;
hbase: shadow namespace, prefix ptshadow_;
elasticsearch: shadow index, prefix ptshadow_;
distributed lock fusion-distributed-locks: shadow key, prefix ptshadow;

Preparation Phase

Access to the fusion framework
The full-link pressure test is based on fusion, and all middleware and specifications must be used in accordance with the unified specifications of fusion.

Streamlining the traffic model
The traffic model can also be called a traffic funnel. That is, the change ratio of external traffic on each calling link starting from the gateway entrance.

Mock module configuration
For the links called by external dependencies, the corresponding processing is carried out through the mock method.

Shadow middleware establishment
After sorting out all the middleware in the combing stage, the corresponding middleware can be built according to the specification.

Test Environment Verification
After completing the above steps, it is necessary to verify the correctness of the mock configuration and traffic marker data falling into the shadow library in the test environment.

Simulation environment verification
After the test environment verification is passed, connect to the simulation environment and conduct joint debugging verification to ensure that there is no problem before entering the stress testing stage.

warm-up phase

Test user generation
Due to the particularity of full-link stress testing, it is necessary to create a batch of user data specially used for stress testing.

Test data preparation
The test data includes basic data and parameterized data (used for pressure test request parameters). Our solution is to migrate production data and desensitize it through a scheduled job.

External service shutdown
Due to the particularity of full-link stress testing, external services will be registered and offline before the stress testing starts to ensure that the traffic of the stress testing will not affect the production business.

Branch Code Release
Multiple rounds of full-link stress testing are required. During this process, each optimization may involve code changes. Therefore, before stress testing starts, it is necessary to confirm that the latest optimized code branch has been released to the simulation environment.

Network isolation check
Similarly, due to the particularity of the environment, it is necessary to confirm the isolation of each service before stress testing to avoid affecting production services.

Implementation phase

Single-machine single-interface benchmark
The single-machine single-interface benchmark pressure test is an essential link. Through single-machine single-interface stress testing, you can quickly find out the performance problems of the tested link itself, which is helpful for the subsequent development of full-link stress testing and the location and troubleshooting of performance bottlenecks.

Single machine hybrid
link The purpose of hybrid link stress testing is to verify the maximum capacity and safe water level of the tested service itself, and provide a reference for full link stress testing and online capacity evaluation.

Full-link stress test exercise
Full-link stress test is an important guarantee for the stability of Internet enterprise systems.

Pulse touch
high test The purpose of high touch test is to verify the highest performance of the current system, to facilitate the evaluation of online expansion, and to leave room for redundancy.

Rehearsal of current limiting function
Current limiting circuit breaker is an important means of guaranteeing service availability. The technical framework we adopt is the sentinel cluster current limiting function, and we have conducted drills on the stand-alone and cluster current limiting functions to ensure the availability of the functions.

The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

As long as you have a dream in your heart, don't stop; as long as you persevere, you will finally usher in the dawn of success. Every effort is worthy of respect, and every struggle is worthy of affirmation. No matter what the road ahead is, you must go forward bravely, continue to pursue your goals, and become a better version of yourself.

As long as you are breathing, keep going. Don't complain about difficulty, because it is what makes you. Face up to difficulties, seize every opportunity, believe in yourself, you will be able to create your own brilliance!

Life is short, time is precious, cherish every moment, break the lazy mentality, work hard, pursue your own dreams and goals, persevere even if the road is rough, believe in yourself, and surpass yourself, in order to achieve a better future.

Guess you like

Origin blog.csdn.net/shuang_waiwai/article/details/130949125