2021 latest Java interview questions and answers, how did I change jobs to my dream Internet company

Cxy kill does not match 2021-10-14 09:05:38
latest java interview questions answers


The first pressure test

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _ The programmer

horrible , Mean response time 150ms, In addition, other problems were found in the process of pressure measurement , Background error , It turns out that OpenSearch Limit queries per second

Optimize code and configuration

1、 modify OpenSearch To configure , And will be pressure tested in the environment OpenSearch Change the connection address to the intranet address .2、 Change the place of cyclic query cache in the code to one-time batch query return .3、 Confirm with related students and remove useless code from the project .

The second pressure test

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _ The programmer _02

While optimizing the code , Changed configuration , But it's worse , And there are new problems . at that time , Checked the code over and over , The number of times to determine the query cache is minimal , And the connection thread pool parameters are also adjusted to a relatively large and reasonable value . If , If the re pressure test still can not meet the requirements , There is only one last move : Caching result sets . namely , To the user ID And user search keywords are key, The result of the query is value, cache 5 minute .

The third pressure test

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _ The programmer _03

It finally meets the requirements , Concurrent 60 When the response time reaches 32ms, And I found a new optimization point .

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _ The backend development _04

Interface actually has the operation of checking database , This can't be tolerated , After the investigation, some unnecessary dependencies were removed .

grow up

Learned to use RedisTemplate Of executePipelined Conduct redis Batch query

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _Java_05

Summary of this optimization

1、 Be sure to avoid circular queries on databases and caches (PS: There can be no query cache in the loop , Not to mention the operation of querying database , Because the number of cycles can't be controlled );

2、 about API Interface , In general, it's directly checking the cache , I didn't check the database ;

3、 Multi use batch query , Use less single query , Try to find out ;

4、 For using alicloud , Pay attention to the configuration of corresponding products , The money that should be spent still has to be spent , meanwhile , Remember to use the intranet address of the corresponding product in the formal environment ;

5、 Pay attention to the connection pool size ( Including database connection pool 、Redis Cache connection pool 、 Thread pool );

6、 Do not deploy other services on the pressure measuring machine , Only the services to be tested , Avoid being affected by other projects ; For online environments , It's best to deploy only one important service on one machine ;

7、 Useless and commented out code , It's better to clean up the useless dependence in time ;

8、 Clusters don't have to say ;

9、 Some monitoring tools can help us better locate problems , For example, link tracking , Used in this project PinPoint;

10、 If the space for technical optimization is already very small , Try to start with business , Speak with actual data , From daily visits , Historical traffic data to convince the test ;

11、 Every code change has the potential to introduce new problems , therefore , Every time you change the code, you need to do regression testing (PS: After each revision , I will use several different keyword search , Then compare the data returned before and after modification to see if they are consistent , This is the time postman, as well as Beyond compare That comes in handy );

12、 The key point is to add more logs , It's convenient to eliminate problems later , Because the most important way to troubleshoot online problems is through logs ;

Last

Three gold and four silver are here , Give a small benefit !

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _Java_06

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _ The programmer _07

2021 newest Java Interview questions and answers , How did I jump to my dream Internet company _ The backend development _08

This article has been  CODING Open source project :【 A big factory Java Analysis of interview questions + Core summary learning notes + The latest explanation video + Actual project source code 】 Included

版权声明
本文为[Cxy kill does not match]所创,转载请带上原文链接,感谢
https://javamana.com/2021/10/20211002160900570e.html

  1. Usage relations and differences of count (1), count (*) and count (a field) in MySQL
  2. 2021 Ali Java advanced interview questions sharing, Java Architect interview materials
  3. Mybatis - dynamic SQL statement - if usage - MySQL series learning notes
  4. [go to Dachang series] deeply understand the use of where 1 = 1 in MySQL
  5. [secret room escape game theme ranking list] Based on spring MVC + Spring + mybatis
  6. Redis log: the killer mace of fearless downtime and rapid recovery
  7. 5 minutes to build redis cluster mode and sentinel mode with docker
  8. Java小白入门200例106之遍历ArrayList的几种方式
  9. Java小白入门200例105之Java ArrayList类
  10. Java小白入门200例104之JDK自带记录日志类logging
  11. Practice of high availability architecture of Tongcheng travel network based on rocketmq
  12. Chapter 9 - Linux learning will - file archiving and compression tar --- zip
  13. Java小白入門200例104之JDK自帶記錄日志類logging
  14. JDK avec journalisation de classe dans 200 cas 104
  15. Java ArrayList Class for Introduction to Java LITTLE WHITE 200 example 105
  16. Plusieurs façons de traverser ArrayList à partir de 200 exemples 106
  17. Provectus / Kafka UI: open source Apache Kafka's Web GUI Graphical interface management tool
  18. Design pattern series: Singleton pattern
  19. Java小白入門200例105之Java ArrayList類
  20. Understanding Java record types
  21. Five load balancing algorithms implemented in Java
  22. Data structure must be an example to understand dynamic programming (with universal Python code)
  23. The idea and implementation of recursion in data structure (Python)
  24. The idea and implementation of linked list (Python)
  25. Data structure must be queue and double ended queue (Python)
  26. Idea and implementation of data structure must be able stack (Python)
  27. Data structure | time complexity (with video explanation)
  28. 20 flutter libraries you should know
  29. Case sharing: Online failure caused by Dubbo 2.7.12 bug
  30. Open source | didi open source, general functional components for Java authentication, authentication, management and task scheduling
  31. Flutter multi engine supports platformview and thread merging solution
  32. In depth understanding of netty: viewing netty traffic control from occasional downtime
  33. Spring AOP internal skill cultivation
  34. Interviewer: is Tomcat a symbolic parent delegation mechanism?
  35. Expérimentez la première tablette de consommation Linux. La puce et le système d'origine sont tous faits maison
  36. 2021 summary of the latest Java common open source libraries, Java interview handwritten code
  37. 2021 latest Java factory interview true questions, Kafka introduction video
  38. 01 javase - première connaissance de l'installation de Java et de l'environnement de développement
  39. The sales volume in September broke the record: Weilai and Xiaopeng both exceeded 10000, with an ideal month on month decrease of 24.7%
  40. Required for interview: HBase block cache
  41. Redis core principle and practice: implementation principle of hash type and dictionary structure
  42. MySQL deep dive: analyzing performance schema memory management
  43. Redis cache: kill interviewer 25 asked
  44. Solution of Chinese garbled code in idea integrated Tomcat console
  45. 2021 the latest java development interview, 46 interview questions take you to understand the advanced Java interview
  46. 2021 spring recruitment bat interview questions are explained in detail and explained clearly
  47. 2021 latest java developer learning route, 2021 latest Ali Java advanced interview questions and answers
  48. 2021 summary of the latest Java common open source libraries, the top java development tools necessary for developers
  49. Java communique avec les capteurs industriels via socket et DTu, RTU
  50. Does Hadoop have to run on Linux? (the root cause is the permission opening advantage of the operating system Linux)
  51. Java communique avec les capteurs industriels via socket et DTu, RTU
  52. 2021 summary of the latest java knowledge system. It took 8 days to finally understand JVM tuning
  53. Introduction au tissu de service Azure
  54. 【.Net vs Java? 】 先来看一下Java和C#的数据类型区别。
  55. 2021 summary of the latest java knowledge system, will you only have the technology of junior engineers
  56. 【.Net vs Java? 】 先來看一下Java和C#的數據類型區別。
  57. [.NET vs Java?] regardez d'abord les différences de type de données entre Java et C #.
  58. 2021 latest Java interview questions and answers, Java interviewer's favorite garbage collection mechanism
  59. 2021 latest Java interview written test, distributed ID generation algorithm in Seata project of source code analysis
  60. 2021 latest Java experience sharing, what java knowledge do we need to learn