Click on “Road of Technology for Migrant workers” and choose “Top or Star label”
10 o ‘clock every day for you to share different dry goods
Author: codegoose
https://segmentfault.com/a/1190000017864721
In the article, I am not a migrant brother, but the author himself. Many of me want to enter a big factory, and we all know that it is very difficult to enter a big factory, and the interview cycle is long (written test, first test, second test, final test). Today to bring you the author’s experience of the goose factory, I hope to help you, some reference!!
After half a year of precipitation, plus the MySQL, Redis and distributed patch, I finally regained confidence in the interview and went out again.
Goose factory
Job interview: Go back-end development engineer, accept Java language transition
It is known that the goose factory is the main battlefield of CPP, and most CPP engineers have high requirements for OS and Network, unlike Java, which focuses on the business layer language.
Previous Java interview companies focused on data structures, networks, frameworks, databases, and distribution. So the OS loses a lot
A:Basic technical surface
During the telephone interview, I casually asked some technical questions. Finally, I asked a medium level algorithm question in LeetCode, which was a little simple. Sort out the memories:
-
Redis has used, commonly used data structures and scenarios used in business.
-
How does Redis hash?
-
How is the rehash process different from JavaHashMap’s rehash?
-
Did Redis Cluster learn how to be highly available?
-
Why not use Redis for persistent database storage?
-
TCP/UDP: Three handshakes and four waves
-
How does TCP guarantee orderly transmission? Talk about TCP’s fast retransmission and congestion mechanism
-
Do you know where the time_wait state is?
-
Udp is an unreliable transport. If you were to design an algorithm that is almost reliable based on UDP, what would you do?
-
What’s the difference between HTTP and HTTPS? Tell me what problem HTTPS solves and how. Talk about the HTTPS handshake.
-
Etcd is used in your project. How to ensure high availability and consistency?
-
Now that you mentioned raft, what’s the basic flow of raft? What if there is a split brain in raft algorithm?
-
Have you looked at the Zab algorithm of Paxos and ZooKeeper? What’s the difference between them?
-
What database do you use for persistence on the back end? Did you use a sub-list? How did you do that?
-
What are the common implementations of indexes and what are the differences?
-
What are the storage engines of MySQL and what are the differences?
-
How InnoDB implements indexes and how? What is the difference between a clustered index and a non-clustered index?
-
Do you know anything about coroutines? What’s the difference between a coroutine and a thread?
-
51. Duplicate numbers in the offer array.
From the above situation, interview redis/MySQL are more important, just two days ago also sent two related articles: interview must ask! Redis replication | Mysql 10 million level data batch insert in 3 simple steps! It’s a good time to review.
Generally speaking, THERE is no problem with redis. I have the impression that the specific rehash is progressive, but the specific principle may be a little different.
TCP time_wait is not very good, I have not understood the implementation of QUIC mechanism before, so when asking the reliability of UDP, basically in mind according to the TCP implementation in the say.
HTTPS has nothing to say. Similar things were used in the previous project, and the research is more clear.
Raft algorithm this happens to spawn 6.824 , the answer is also ok, but PAxOS and ZAB algorithm is really not familiar with, directly said not.
MySQL is very familiar, including indexes, locks, transaction mechanism, MVCC, etc., nothing to say, it has been fixed.
Coroutines and threads, mainly said the go program and Java thread difference and go program scheduling model. There is no mention of kernel-mode switching for threads, and go programs are scheduled only in user mode.
In the last algorithm question, first of all, it was said to use HashMap to do it, and whether the space complexity could be reduced to O(1). Then it took about 5 minutes to come up with the idea of in-situ replacement.
Generally speaking, the answer is ok, one side so pass.
2:Project technical aspects
The second interview was transferred from the basic technology investigation to the project, and mainly asked me the following questions:
-
For the project I am most familiar with, DRAW the project architecture diagram and the main data table structure of the project.
-
Talk about the technical points used in the project, the total peak QPS of the project, the delay.
-
Have you analyzed where the time delay occurs and what improvements are made in the project?
-
If there is a problem with the request and no response, how to locate the problem?
-
How to deal with TCP sticky packets?
-
Then also asked the mode of cache update, and the problems and coping ideas?
-
In addition to company projects, have you researched or contributed to prestigious projects in your spare time?
This part of the answer is also relatively smooth, because they are all about the project, I am very familiar with, basically there is no problem, except the interviewer said that the project experience is a little weak, the rest is good.
Three sides:Integrated technical surface
This aspect is a mess, the interviewer used to ask questions to the bottom of the way, after all, the interview experience is not enough, resulting in a bit of chaos in the pace of the interview. Here’s an example:
What’s the difference between a go program and a thread?
A: Starting a Go program requires about 4KB of memory and starting a Java thread requires 1.5MB of memory. The scheduling of go program in user mode is very lightweight, and the switching cost of Java thread is relatively high.
Then ask why the cost is higher? Is the cost high because Java thread scheduling needs to switch between user and kernel mode? Why is the scheduling cost of switching between user mode and kernel mode high? I gave you a brief definition of kernel and user mode.
Still don’t understand why the cost is high? My heart suddenly collapsed, and it went on and on. OS was still in pain, so I gave up for a long time.
All the following questions follow this pattern, resulting in a loss of rhythm and a feeling of being set. Most of them can answer one, two or even one, two, three, but after that or deeper OS level GG.
Then I asked what was the biggest challenge during the project and how did I solve it?
Also asked a question to locate the problem, server CPU 100% how to locate?
It may be due to the usual thinking set of positioning business problems, coupled with being in a blinding state, casually is:
-
Check the monitoring panel for sudden traffic anomalies
-
Then check whether the service logs are abnormal. For the cpu100% period, check the logs of a typical service process
-
Finally, use the top command to monitor which process is occupying 100%
Sure enough, he came to her with his mouth open and covered his face…
For this problem, the correct idea should be to use TOP to locate the faulty process, then use TOP to locate the faulty thread, and then print the thread stack to check the running status
This process would have worked out normally, but, but no buts. I still have to sum it up.
Finally, I asked a system design topic (the design of the circle of friends). On the whiteboard, I drew the architecture diagram of the system, the main table structure and explained the main business process. If there are more users and more traffic, how will the architecture be expanded and how to deal with it?
This answer is also a bit messy, directly up to the use of a general framework, feel no bright spot.
Later reflection should first locate the characteristics of the business, this business is obviously more reading than writing. Then communicate with the interviewer about the number of users, performance requirements, QPS target for the first phase of the program, etc.
Design after defining the characteristics and constraints of the system, rather than starting with the generic architecture of the typical Internet.
Interview result: 3 days later received a text message, was rejected
Conclusion:
-
TCP/UDP, HTTP and HTTPS as well as the network (various network models, has been select, poll and epoll) must be very familiar with “large factory to the basic requirements are very high, so the basic is very important”.
-
Be sure to have project experience and be able to explain clearly the trade-offs between projects. Design models and data sheets “show that project experience is important”.
-
Distributed to be very familiar with the “necessary skills into the big factory ah”.
-
Common problem positioning must have ideas “thinking is everything”.
-
The operating system, the operating system, the important things say “the underlying importance” three times.
-
System design, train of thought, train of thought, must be thinking clearly, must summarize the process of system design “explain must have their own unique insights and ideas”.
-
A little experience, usually blog and columns to see more, if there is no own thinking is just passing through, will not become their own things, like the kernel state and user state, usually also read, but did not think carefully, suddenly want to say, really can not say it, this is very embarrassing. Do not build a platform with sand, the foundation of this thing or need time to slowly solid, more to think and summarize “knowledge from their own thinking and summary”.
The above annotated text is the migrant elder brother according to the author’s summary of their own summary. For the workplace or interview, in fact, brother migrant workers before also wrote some summary of the article, today again attached:
“Gold three silver four” toss to talk about the interview
Job-hopping Guide (2019 Edition)
When presenting your project experience in an interview, the success rate can reach 98.99%
IT people interview must see! 25 minefields and 11 necessary questions!
Click the picture to go to the book list
Today’s topic
Have you ever interviewed for a large company (not just one with 300-500 employees)? Have you ever been accused or abused during a job interview (20-100 words)? Select a message randomly selected from the message lucky reader (the next day’s headlines the first top message announced) to send any book in the list above.
Bring about
END
Pay attention to the wechat public number of the road of technology of migrant workers, in the background reply keyword: 1024 or 2048, you can get a latest arrangement of technical dry goods.
– MORE excellent articles – |
-
The company does not want to give compensation for layoffs, actually play these shameless means of layoffs..
-
Mysql 10 million level data batch insert just three simple steps!
-
Interview must ask! Redis copy in 5 minutes
-
A lot of panic! The new girl just ordered the company to delete the server data…
-
Recommend 2 super cool, cool, practical Docker management tools!
Long press the TWO-DIMENSIONAL code to pay attention to the technical road of migrant workers
Public number background reply “catalog” can view the public number article catalog, reply “add group” can join the reader technical exchange group, communicate with you together.
All the best of the official account is here
You click one at 👍
Is the biggest support