Interview goose factory, I severely abused three sides. . .

Author: codegoose

source:

https://segmentfault.com/a/1190000017864721

This article belongs to the author of all


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

Goose plant

Job Interview: Go back end development engineers, accept the transfer from the Java language

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 business layer.

Java-focused company before the interview or in a data structure, network, frameworks, databases, and distributed. So this OS eat relatively large loss

Side: technical basis

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

  • redis used there, commonly used data structures, and used in business scenes.

  • The hash redis how to achieve?

  • to talk about the process and JavaHashMap rehash rehash of what's the difference?

  • redis cluster have not understood before, how do high availability?

  • Talk about the persistence mechanism redis, why not do a special database to store persistent use redis?

  • Do not understand the tcp / udp, said the definition of both, tcp why the three-way handshake and four waving?

  • tcp how to ensure an orderly transfer, fast retransmission and congestion mechanism under tcp talk

  • Do you know time_wait state, which appear in any place, what's the use?

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

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

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

  • Now that you mention the raft algorithm, speaking at the basic process raft algorithm? 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?

  • What do the back-end database you persistent? There is no use sub-library sub-table, how to do?

  • Common implementations index What, What are the differences?

  • 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?

  • There is no understanding had coroutine? He said difference under the coordination of processes and threads?

  • Algorithm is a problem, to prove safety offer 51 questions, an array of repeating numbers?

My own answer is probably the case, he said, redis piece lacks the problem, there are specific rehash impression 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.

Generally speaking, the answer is also OK, so one side before.

Two faces: a technical project

Two faces shift from basic technical visit to the project, the major asked me the following questions:

  • For their most familiar items, architecture diagram drawn project, the project's main data table structure.

  • Talk about the technology used in the project to the point of total peak project qps, delay.

  • There is no time-consuming delays occur analyzed separately in what place, what's improvement project is not?

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

  • tcp stick package deal with the problem how?

  • Then also we asked the next cache update mode, as well as problems arise and deal with ideas?

  • In addition to the company's projects, there is no spare time studied or well-known projects have contributed?

This side A relatively smoothly, because all around the project, he is very familiar with, so what's basically no problem, in addition to the interviewer says project experience weaker, the other bad.

Three sides: Comprehensive technical

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:

Which has a title: 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? I simply say that the definition of 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 how to solve?

Also I 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, it is casually:

  • First check to see whether the burst panel monitor traffic anomaly

  • Then see if there are 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. . .

On this issue, I would have 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 usually change can certainly 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 reading and writing less. Then the interviewer and communicate a program beginning amount of users, 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.

Interview result: 3 days after receipt of text messages, denied

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. The project must have 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. FAQ 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. Little experience, usually blog and columns 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 think carefully, suddenly want to own that 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.


END


Long press the map two-dimensional code, civet cats immediate concern [technical] nest

Ali, Jingdong, the US group, beating top technical experts based in bytes

IT people to create a "temperature" technology nest!


Reproduced in: https: //juejin.im/post/5d0bbbd5f265da1b8811e2ac

Guess you like

Origin blog.csdn.net/weixin_34240520/article/details/93181193