I had been working as a back-end in a medium-sized Internet company until March of 21, and formally resigned after the work handover was completed in mid-March. Why did I leave? It's very simple. I just want to go to a bigger company and give myself more room for development and learning, so I resolutely resigned in nakedness (Note: Everyone should not follow me, please consider carefully).
Since then, I have been preparing for the next interview. As the title indicates, my target is these companies (Netease, Tencent, CVTE, Byte), and the only thing I want to go to is Byte. The next step is to share with you my interview experience and the questions asked during the interview.
1. CVTE side:
Database connection timeout problem
Index calculation, why does it fail
Database index structure
The difference between clustered index and non-clustered index, back to the table
The data isolation level of the database, what will go wrong
The order is generated and has not been submitted yet, and an mp message is sent to ship, but the order status may not be queried
Guarantee of idempotence
Design of distributed lock
Interview follow-up: The results of the interview will be out after three days. Because of the time issue, the second side will be postponed to the end, but because of the interview process of other companies, I considered it comprehensively and gave up the second side opportunity. , But thank you very much for the interview opportunity provided by CVTE!
2. Three sides of Tencent (the only one that went down by these companies)
Tencent’s interviews are relatively difficult, and the interviewers are also very serious and professional. The moment you step into the room, you can feel the serious atmosphere.
What is the form of service deployment? What if a computer room goes down? Is it dependent on components or the business does it by itself? Understand how this piece is made?
What will the platform do with the sudden increase in traffic?
Kafka usage scenarios in business
For a small problem in the project, understand the entire call link
Thread cross-printing 12A34B56C, multiple implementation methods (one printing number, one printing letter)
The difference between synchronized and lock
What is the lock optimization of synchronized?
How many objects will String str=new String (a+b) create? Where is the string constant pool in Jvm
The design pattern of spring? How is the factory pattern realized?
How is the accuracy of Kafka designed? What do you do to prevent repeated consumption?
What is the purpose of the sentinel mode? What is the whole process like
The Java process is missing, how to locate it?
The transaction characteristics of mysql? How is atomicity achieved (through undo log log)
The default isolation level of mysql? What is non-repeatable reading
The difference between select poll epoll? epoll data structure
What is the function of this listen backLog after three TCP connections
TCP waved four times, where did Time WAIT happen? What is the effect of two timeout retransmission times? How to deal with a large number of timeouts?
https encryption process? The process of certificate authentication
How to communicate between processes? What signal communication is unreliable? Why is it unreliable?
How to solve the thread deadlock situation?
1 2 35 5 35 2 56 Count the number of occurrences of 2 35, sort by order
The request has timed out, but the application cannot find the request log, how to troubleshoot
How to solve the zombie process? Did you know about the coroutine?
Algorithm question: a string, a substring, determine the number of times the substring appears in the string, it is not required to be continuous, but there is a sequence of s=rabbbit t=rabbit, and the number of occurrences is 3.
The challenge of the project
The difference between Kafka and rocketMq
The difference between local cache and redis cache
Locally cached scene
Redis's data update strategy and the like
Redis deployment method, loss of data in cluster deployment, active/standby switching process
What features does Flink use
How is spring boot used in the project?
How to use the thread pool project and what problems have been encountered
Understanding of Hashmap
How to use in threadLocal project
The difference between optimistic lock and pessimistic lock, the use in the project
Topic: The realization of producers and consumers, wait and notify
The difference between Synchronized and ReentrantLock
CPU memory model
Java's memory model
TCP reliability guarantee
Why the index can query speed
Redis data structure, the realization of the ranking
Implementation of Distributed Transaction
Storage of spring beans
How to use the Java data source
Follow-up: In the end, I still hung on the three sides. In fact, the interview was not bad in general, but I did not fully prepare before the interview, which led to some poor performance on the third side.
Third, the two sides of NetEase:
The difference between guava and caffeine
The difference between HashMap as a local cache and caffeine, how much memory the local cache generally occupies
What is the heap memory configuration of jvm? If the initial value of heap memory is set to 2g, how much memory is allocated to this process at startup
The container memory is 3g, and the heap memory is 2.8g. What's the problem?
Create a lot of thread pools, leading to oom, what is the difference between this and oom caused by too much local cache
The difference between heap memory and stack memory
The data consistency problem of redis cache, what is the distributed lock?
What is the architecture of the redis cluster?
Is HashMap thread safe? How is ConcurrentHashMap implemented
Implementation of Synchronized Lock
What is the lock optimization, and what is the bias lock?
What garbage collector is used? What is the difference between CMS and other old-age garbage collectors? The difference between CMS and G1
The difference between dynamic agents
Implementation of Spring Aop
Zookeeper's ZAB protocol
What is the main responsibility in the project? What is the scheme design like, difficult problems and how to solve them
How future.get() is implemented, the understanding of futureTask
How to make the service highly available and how to monitor the process
Enter a URL on the browser, roughly the execution process, link layer, network layer router selection
Operating system memory management
Talked about the project
How to optimize database indexes and storage engine problems?
Some basic problems of caching, how to ensure consistency, and the general architecture
Implementation of high service availability
A general introduction to Kafka, reliability assurance, and repeated consumption issues
Introduction to consensus algorithm
Follow-up: The first two sides of NetEase have passed, but because it happened to meet the Chinese New Year, the third side was about a year later. The time span is too long, because I will have to go to byte interviews after the year. Compared with NetEase, I I wanted to go to bytes more (not because NetEase is not good, but I am more inclined to bytes), so I refused.
But I still have to complain about NetEase's interview results. It usually takes 7 to 10 working days to know, it's too long...
Four, all sides of the byte (finally won the favorite offer)
Responsible for the introduction of the module, understand
How to make the service highly available
Local cache timeliness
How to ensure the consistency of mysql and redis data
Introduction to redis cluster deployment, the process of getting key from initiating a request to obtaining a value
How is the internal consistency of redis achieved? During the RDB snapshot process, why can the fork process read the snapshot data? The difference between full and incremental replication
Introduction to the redis data structure, introduction to the hash structure, the implementation of the jump table at the bottom of zset, the time complexity of the jump table
Ask some detailed questions in the project
Introduction to the principle of distributed locks, what problems will occur if the lock is released without the lua script
How to use the .Mysql primary key in general? If you use auto-increment id, the returned records will be displayed to the front end. It is easy to see the approximate number of records of the project. Is there any way to solve it?
How to generate auto-increment id? Introduction to the snowflake algorithm? How to ensure the work id in the snowflake algorithm for container deployment? Introduction to distributed id generator?
The clock back problem in the snowflake algorithm
.High-performance id generation algorithm, what is a good solution
Introduction to Mysql Joint Index
Mysql index data structure? What is the difference between a clustered index and a non-clustered index?
Introduction to Mysql transaction isolation level? What is phantom reading? The solution to phantom reading? What is the difference between normal select and locked select? How to do optimistic lock?
Understanding of JVM, introduce the whole process from new object to garbage collection
How to do JVM tuning in general? Describe in detail the process of memory leak analysis, how to find and how to solve it
Algorithm question: Left view of binary tree
Algorithm question: Given the call time between different services, find out the longest call time of the link (ms)
The longest call time is 300m3, from A to B to C
Distributed transaction, cache, basic knowledge of mysql, jvm tuning
Talked about the project
Algorithmic stock profit maximization (transaction only once, and the original title of leetcode that can be traded multiple times)
Continue to talk about the project, mainly talking about the project modules that I am responsible for, difficulties and the like
Cache consistency problem guarantee
Kafka message reliability guarantee, repeated consumption, how to guarantee idempotence
Thread model, the difference between threads that handle network connections and client requests
https key exchange process, how to ensure that the public key is correct and reliable
What is the role of each layer in the 7-layer model of the network? After the tcp connection, the router is suddenly disconnected, do you need to reconnect?
The communication method between processes and the communication method of shared memory give several scene problems
How to improve skills in the usual way of learning
How about the previous interview? Is there any other optimal solution for the algorithm of the previous interview?
What is the overall system design of the project? What are the modules? How are different modules connected in series? The boundary problem of the module? How to weigh? What are the possible problems and how can they be optimized?
Questions about some modules of the project, data consistency guarantee? Is the transmitted data encrypted? What will happen if there is no encryption? How to deal with it
The biggest challenge during work
How to deal with system stability problems
What is the usual business model?
What do colleagues say about you?
Reasons for job-hopping, usual learning methods, hobbies, expected salary, etc.
Follow-up: Thanks to the good preparation before the interview by Byte, the overall interview process is quite smooth. Byte’s interview is still to be exaggerated. The interviewer is very kind, so the atmosphere of the interview is quite relaxed. Soon after, I received the offer.
5. Share the actual interview notes (including answers):
Before the interview and during the interview, I personally compiled and summarized a lot of "real interview notes", and now I share them with friends preparing for the Golden 9th Silver 10 interview, I hope it will be helpful to you.
Java Architecture Interview Manual:
JVM interview topics and answers: (covering all common interview questions of JVM)
MySQL interview topics and answers:
Redis interview topics and answers:
Spring boot interview topics and answers:
Spring cloud interview topics and answers:
There are a lot of friends who don’t want to show all but need the full version
In general, although the travel in these few months has been very hard, I have also gained a lot. In fact, the moment you walk into Dachang, you can not only appreciate Dachang’s interview style and difficulty, but also their management and work efficiency are worth learning. So when I got this offer, I felt that these few months of running and hard study were very worthwhile.
Due to space limitations, we will not show them one by one. Those who need the full version of all the information shared in the article above should pay attention: one-click three links (like+favorite+follow) and then directly add WeChat: mxh5261 to get a percentage. 100 free access