Interview questions for P7 positions of Alibaba, Tencent, meituan, etc. recently interviewed by friends


Interview questions from recent friends.




  1. How to make a deep copy of an object, except clone
  2. Happy before principle
  3. Practice of JVM tuning
  4. Will singleton objects be recycled by JVM GC
  5. How to optimize redis if the list is large
  6. Packet and half packet of TCP
  7. Socket programming related API and usage
  8. Is it the same socket that establishes and processes the connection? What are the two queues in the socket
  9. Has netty ever been used in the project
  10. New features of tsl1.3
  11. Principle of AES algorithm
  12. The use of redis cluster
  13. Comparison between MySQL and mogo
  14. Scene Title: design an IM system, including group chat and single chat
  15. Design database connection pool
  16. Scene Title: Design of second kill scene





  1. Project details, involving some aiot interactive processing, how to achieve a large number of different devices instruction encoding and decoding and instruction conversion, server architecture, their own responsibility module
  2. Trouble shooting of OOM
  3. Have you ever used a distributed lock? How to implement it? Let’s talk about the principle
  4. Where and why are redis’s jump meters used
  5. Practical experience of MySQL optimization
  6. Difference between HashMap 1.8 and 1.7
  7. The principle and application of netty
  8. The connection process of TCP
  9. How many queues does socket have
  10. How many connections can a server support and why
  11. How to set TCP parameters
  12. The basic data types of redis, the principle of redis cluster, and the use of cluster
  13. MySQL storage engine type, index type, InnoDB data storage mode
  14. Thread pool parameter description, rejecthandler description
  15. The principle of volatile
  16. What kinds of garbage collectors does the JVM have and their application scenarios
  17. Characteristics of G1 recycler
  18. JVM structure
  19. Four layer and seven layer load balancing principle of load balancer
  20. Scenario Title: design a high availability and high concurrency e-commerce system





  1. How to realize idempotent in Kafka production end
  2. How Kafka implements distributed message
  3. Synchronization mechanism of Kafka’s slave
  4. Kafka how to write message back
  5. Why must hash be implemented before equals
  6. How to save the structure of a new object
  7. Let’s talk about the process of class loading
  8. Hash data structure of redis and how to expand it
  9. How to implement MySQL snapshot
  10. MSYQL transaction isolation level, can’t repeat read and magic read difference





  1. JVM tuning ideas
  2. Redis cluster expansion how to smooth the data excessively, from the client design
  3. The reason why the index is not used when the SQL of MySQL itself is OK (repeatedly emphasizing that SQL is OK, there is no need to consider it from the perspective of SQL)
  4. How does Kafka ensure that messages are not lost
  5. How to perform cross database joint query for sub database and sub table
  6. The current limiting design is implemented in Java instead of tool class library
  7. Dubbo design and complete call process (to be detailed)
  8. How to solve the cleft brain problem of ES

Are you hungry

  1. Project introduction, how to continuously optimize the project and upgrade the architecture? If the business volume increases sharply, how to ensure the high availability and scalability of the system?
  2. How much is the order quantity and daily increase? How to do sub database and sub table? Based on what dimension?
  3. It is detected that the memory of the JVM is larger than the memory configured by Xmx of the configured JVM. One of the three machines has the above phenomenon. How to explain it?
  4. How to solve the problem of redis hot key?
  5. Why is Kafka high performance?
  6. OO scenario analysis?
  7. How to deploy MySQL Cluster, master-slave synchronization?
  8. How to set which GC mode to use? What are the GC collectors of different ages?
  9. Online CPU is very high, how to check
  10. New features of JDK1.8
  11. Bio / NiO understanding
  12. How does MQ guarantee the reliability of messages?
  13. What should I do if the system load is too high and what is the cause? How to check?
  14. What is the brief introduction of Linux operating system?


  1. Introduction to JVM
  2. JMM model
  3. What is GC root?
  4. JVM tuning experience?
  5. Thread pool considerations, exception handling
  6. How to use distributed lock?
  7. How to persist redis? High availability?
  8. How to implement RPC framework?
  9. Check for slow interface calls
  10. Business system architecture, business volume
  11. Database design, optimization scheme


The above are the interview questions collected and shared by my friends recently. I hope you can understand what is the interview questions of large-scale Internet famous enterprises. If you feel the harvest, you can pay attention to the collection and forward a wave. Thank you for your support!!


1. Sort out knowledge

In a general interview, you will be asked about JVM principles, multithreading, data structures and algorithms, high concurrency, design patterns, etc. These are the knowledge structures of an ordinary java developer. Then, Alibaba P7 definitely needs to have more knowledge trees and master a more comprehensive knowledge system, so it is necessary to sort out the knowledge systematically.

Against P7, the knowledge system I combed is as follows:

  • Basic skills: concurrent programming, JVM, network programming and efficient IO, mysql, Tomcat
  • Design idea and open source framework: SSM (Spring + spring MVC + mybatis)
  • Linear performance improvement architecture technology: ZK, nginx, rabbitmq, rocketmq, Kafka, elastic
  • Efficient storage makes project performance take off: redis, mongodb, mysql, MYCAT
  • Distributed extension to microservice architecture: springboot, spring cloud, spring cloud, Alibaba, docker, k8s

2. Review knowledge

Working for such a long time to go to the interview again is definitely to take out your knowledge reserve again. To review all knowledge points in place, you need to choose what you are most used to through various ways. Whether it’s reading e-books or watching videos, it’s OK, but remember to make your own study notes, which can play a role in summing up. It’s especially clear when you go to review.




Notes on learning source code:



3. Brush the interview questions

Working for 5 years, although I know what technology is popular now, I really don’t know what big Internet companies will interview, so it’s necessary to brush the interview questions before the interview, so I can draw inferences from one instance. I have sorted out the interview questions on the Internet for nearly three years, and the content is really quite a lot.




Finally, I hope everyone can have their own clear development path, I hope you can successfully win the offer, enter the ideal company, mutual encouragement!

In the above articles, all the documents can be shared with you for free,You can click here!! Code blog Garden, to get the information!

Recommended Today

Looking for frustration 1.0

I believe you have a basic understanding of trust in yesterday’s article. Today we will give a complete introduction to trust. Why choose rust It’s a language that gives everyone the ability to build reliable and efficient software. You can’t write unsafe code here (unsafe block is not in the scope of discussion). Most of […]