Summary of stress testing problems

 

        The pain of stress testing is beyond words, but the gains and growth are remarkable. Recording bit by bit is the summary of sweat and tears.

 

 

 

--------- Account Movement Notice----------

1.kafka parameter adjustment:

·socket.receive.buffer.bytes 6024100 -> 1024100 Note: Kafka and consumers must be consistent.

Kafka suggests adding monitoring measures.

·Stop operation must be standardized, otherwise there will be a zombie process, and it is very troublesome to restart.

 

2. Notify consumers of account transfer:

·max.partition.fetch.bytes -> 2097152。

·The configuration file kafka.poolTimeout is changed from 5000 to 500.

·The messageId is unified.

·Parameters are passed as objects as possible, which is easy to maintain.

 

3. The agent IHS of the moving account notification needs to pay attention to the configuration.

 

--------- Red envelope ----------

1. The process of opening the red envelope is an Ajax request, and the openId must be obtained from the session.

2. Change the cache of the sequence index of the database from 20 to 1000 (the middle row is basically 1000).

3. Add an inverted index on the date index column, or detail the date to achieve a good hash distribution.

4. Static resource pre- or compression problem, the traffic is equal to the file size * 8.

 

 

--------- Instruction ----------

1. The implicit conversion of scala will cause problems in high concurrency. Insufficient class loader problem.

2. The code should have a good pattern, and it is the first premise that the code is easy to understand.

 

 

--------- Page ----------

1. Reduce database operations, especially cases that can be solved in a more elegant way.

2. The logic that can be processed in the database, it is best not to put it in the code.

3. Reduce the access frequency of the interface to maximize the use of the interface to access information. Note: The cost of network transmission is higher! ! ! !

 

--------- Baffle ----------

1. The configuration file is initialized to memory to minimize IO operations.

2. Member variables must be defined as final. In high concurrency, the misoperation of member variables will cause big bugs.

3. The development code must have management tools, submit the code in time and fill in the notes.

4. The development must implement the specified specifications, and the tediousness in the early stage will unlock the follow-up problems.

 

--------- other ----------

1. The console log must be turned off, sometimes a deadlock problem occurs, affecting the TPS from 250 to 30.

2. The environment must be consistent in order to reduce suspicion of environmental problems.

3. Try not to stop the program by force. It would be better to stop in a more elegant way, and try to use the hook program as much as possible.

4. Add cache configuration for static resources in IHS.

5. The business needs must be clearly defined before development, and the project must be flexible and easy to expand.

 

 

 

Finally, problems need to be dealt with head-on, and running away is a bad idea.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326819173&siteId=291194637