Java back-end three and a half goose factory interview experience, and finally kneeling!

After half a year of precipitation, coupled with padded MySQL, redis and distributed this finally began to regain confidence in the interview, set off again.

Goose plant

Job Interview: Go back end development engineers who turn language from Java.

Cpp know goose factory is the main battlefield, and to cpp background engineer most of the os, network requirements are particularly high this piece, unlike the Java language such emphasis on the service layer, a company focused on Java before the interview or in a data structure , networks, frameworks, databases, and distributed. So eat OS this loss is relatively large.

Basic technical side

Telephone interview, ask some technical questions, and finally asked a LeetCode inside medium-level algorithm problems, partial simple.

1, redis have not used, common data structures and scenarios used in the business, redis how to achieve the hash, rehash and talk about the process of JavaHashMap rehash what's the difference? redis cluster have not understood before, how do high availability? Redis the persistence mechanism, so why not do a special database to store persistent use redis?

2, do not know the tcp / udp, said the definition of both, tcp why the three-way handshake and four waving? tcp how to ensure the orderly transfer of, say under fast retransmission and congestion mechanism tcp, and know time_wait state, which appear in any place, what is the use (refer quic)?

3, know udp is unreliable transport, if you design a reliable udp almost algorithm, how design?

4, http and https what's the difference? He said at https solve the problem, how to solve? Said the handshake process under https.

5, look inside your project with the etcd, on the next etcd what to use, how to ensure high availability and consistency?

6, now that you mention raft algorithm, speaking under the raft algorithm is the basic process? If the algorithm raft which appears split brain how to deal with? There is no algorithm to find out about zab paxos and zookeeper, who before what's the difference?

7, your back-end database what do persistent? There is no use sub-library sub-table, how to do?

8, a common way to achieve what the index, what difference? MySQL storage engine which, what difference? InnoDB uses the index is what means, how to achieve? Said difference under the clustered index and non-clustered indexes?

9, there is no understanding had coroutine? He said difference under the coordination of processes and threads?

10, a arithmetic problem, to prove safety offer 51 questions, an array of repeating numbers?

Their answers situation, redis piece lacks the problem, there are specific rehash impression it is gradual, but specific principles might answer a bit out. A piece of time_wait tcp is not very good, not previously been achieved quic understand the mechanism, so when asked reliability udp, basically my mind did as realized in tcp he said. https piece of nothing to say, before the project which is useful to something like that, study more clearly. This algorithm raft because just brush 6.824 (only brush to lab2 ...), A. also improvise, but paxos and zab algorithm does not familiar with, not directly say. MySQL this very familiar, including indexing, locking, and mvcc transaction mechanism and so on, nothing to say, have been filled up. Coroutines and threads, said the main difference go away and Java thread scheduling model and go process. Tip interviewer does not mention the core thread has a switching state, go only in user mode scheduling process. Finally, an algorithm problem, first of all say that the use of HashMap do, said space complexity can not be reduced to O (1), behind only thought about 5min thought out ideas in situ replacement.

Two faces technical project

1, mainly for their most familiar items, architecture diagram drawing program, the main data table structure, technology used in the project to the point of total peak qps, delay, and there is no analysis too time-consuming delays occur respectively, in any place, so what's improvement project is not?

2. If the request does not respond to a problem, how to locate the problem, said the next idea?

3, tcp stick package deal with the problem how?

4, asked the next cache update mode, as well as problems arise and deal with ideas?

5, in addition to the company's projects, operations have not studied or well-known projects have contributed?

So what did the basic problem, in addition to the interviewer says project experience weaker, the other bad.

Comprehensive technical three sides

This is all things into confusion, the interviewer uses inquisitive way to ask questions, after all, it is not enough to interview experience, leading to the rhythm of an interview a bit messy. For example, there is a question which is: go away and threads What is the difference?

A: Since probably only need to drive a go 4kb memory, from a Java thread requires 1.5MB of memory; go scheduling process in user mode is very lightweight, Java thread switching costs are relatively high. Then asked why costs are higher? Because the scheduling of Java threads need to switch the cost is high in user mode and kernel mode? Why between user mode and kernel mode switching schedule relatively high cost? Simply defined kernel mode and user mode. Then he asked, or did not understand why the high cost? Heart instantly collapse, endless Yeah, OS this is still a pain ah, hesitated for a long time to give up.

All questions are behind this model, the results answer no rhythm, the feeling of being routine. Most degrees can answer a twelve or even a three, but then again the OS level or another in-depth on the GG.

Later asked the biggest challenge under the project encountered in the process, and the time how to solve?

Behind also asked a question of positioning, the server CPU 100% how positioning? May be due to the positioning of thinking usual business problem set, combined in a blinded state, is casually: first check to see whether the monitoring panel burst traffic anomalies, and then see if there is an abnormal traffic logs, CPU100% for that period of time, take a typical business process log viewer. Finally referred to the use topcommand to monitor to see which process takes up to 100%. Sure enough into confusion, mouth came, Behind his. . . Had the right ideas should be the first with a toppositioning problem of the process, and then topnavigate to the wrong thread, and then print to check the running thread stack, this process can certainly change usually answer them, but, but, but no. Still have a good summary.

Finally, ask the subject of a system design (design circle of friends), draw whiteboard system architecture diagram above, the main structure of the table and explain the main business processes, if the user increases the flow rate increases, how architecture will expand, how to deal with? The A's also a bit chaotic, self-serving directly up with a common architecture, feel lackluster. Reflections on the back should first locate the characteristics of the business, this business is obviously less reading and writing, and then communicate with the interviewer and the amount of a user program first started, performance requirements, what is the single goal qps etc.? After a clear system characteristics and design constraints again, rather than beginning with a common architecture typical of the Internet kind of self-serving has been engaged in their own programs.

to sum up

1, tcp / udp, http and https as well as network piece (various network models have been select, poll and epoll) must be very familiar with.

2, must have project experience to take shots, but also to be able to make it clear, clear project choice, design models and data tables.

3, distributed to be very familiar with.

4, FAQs positioning must be thinking.

5, operating system, or OS, the important thing to say three times.

6, system design, ideas, ideas, ideas, ideas must be clear, be sure to summarize the system design process.

7, it is important experiences, and columns usually blog to see more, if not their own thinking but superficial, and will not become their own thing, just as kernel mode and user mode, and are usually seen, but did not fine I thought, suddenly said to myself, really can not tell, which is very embarrassing. Not to be quicksand high-profile building, the basis of such things still need time to lay slowly, to think more and summary.

Guess you like

Origin www.cnblogs.com/silyvin/p/11312157.html