At the end of last year (2018), I wanted to explore opportunities and finally got the offer from PingCAP, Toutiao and Oral offer from Ant Financial. I thought I could sum up my experience and share my journey of “riding a donkey to find a horse”. Of course, one’s opinion is inevitably superficial. If there is something wrong, please correct it.
If you are interested in only one company, you can skip to it:
- Preparation process
- Interview: PingCAP
- Interview: Ants
- Interview: Headlines
- conclusion
Preparation process
I have worked for my old company for more than two years after I graduated from college. My old company is a “small company “(after all, there is no BAT or TMD title in this year, I am embarrassed to report my background). I have not worked in a big factory for more than two years after graduation, so it is very, very empty when I look for a pit. In a panic, I thought for a while to cheer myself up. The process of actually finding a hole and preparing for an interview can be divided into several stages:
- Introspection: do you really want to quit? If not, what should you do in your old employer to continue to improve?
- Positioning: Where are my strengths in hard skills (coding, architecture)? What are my strengths in soft skills (communication, teamwork)? This step along with writing a resume
- Look for platforms: which platforms can satisfy both: 1) challenges and room for improvement; 2, in line with my positioning direction; 3. The team atmosphere is as good as (or better than) the old team
- Looking for someone to push inside: basically is in v2 to find (sincere thanks to everyone to help me push inside big guy)
- The interview talk about offer
In fact, it took me several days to locate this step. First, I sorted out my project experience and expertise in the work content, and took Java + Golang as my “hard signature”, having done a wide range of business (business, middleware and infrastructure) and having expertise and interest in K8S cloud native. Then I set myself as a “soft brand” with strong learning ability, like communication and cooperation, and eager for challenges. Finally, I positioned myself as a “strong learning ability and research ability demonstrated in the past experience, but eager for challenges and unwilling to stay in the comfort zone” (shame on you!!). .
In this process, my methodology is “perspective-taking”. I have interviewed a lot of people myself (so the company usually asks me to interview, although it is a bit hard, but it is also accumulated), and I have also talked with HR and the business side that released HC about what kind of people we want to hire. Therefore, the whole process is to examine themselves in the interviewer’s mind:
If I were an interviewer, what kind of people would I hire as colleagues?
To give you a few examples, here are some of the questions I’ve considered along the way (just to my taste, of course) :
- What do I look for in a person who has graduated more than two years? In fact, people at this stage are still “empty cups”. I hope that he has strong learning ability and initiative to cultivate a super productivity for his department.
- What makes me “hate a resume” : highlighting every item in all caps, especially when the details are not focused; List the capabilities of frameworks when they are used for a class of scenarios that they feel can solve a class of business and so on;
- What questions would I prefer to ask in an interview? Languages and middleware that are “understood” or “proficient” on the resume; The second is the interesting projects on the resume, which are not fully explained;
After positioning, THE next position I wanted to find was basically locked in the direction of PaaS, cloud native and middleware. The next step is to find a pit. During this period of time, “Winter theory” is very hot, good pit is really difficult to find. Finally, I went round and round to find four internal promotion: Shopee (Singapore), PingCAP, Toutiao, ant. It was a pity for Shopee that they only received a reply to an appointment at the beginning of January after sending out their resume in early December. At that time, other interviews were nearing the end, so they chose to reject them.
After sending out the resume of these several, I focused on the resume “buried several pits”, that is, I wrote “understand and master” language and middleware and specifically used to seduce the interviewer to ask the project to review again. Later found that this step is very key, a lot of knowledge if you do not review the content really forget all, this is also calculated at the last minute, not fast light bar.
Let’s get down to business and talk about our interview experience one by one:
- Pingcap-cloud direction
- Ant-container Scheduling Direction (CTO line)
- Headline – Engineering performance direction
PingCAP
- Before the interview
- One side
- Second interview
- On three sides
- All around
- Five surface
- PingCAP summary
Before the interview
PingCAP’s resume response was the fastest. HR contacted me the next day after the internal promotion. After the telephone was connected, there was a brief talk about life, and then there were three social recruitment questions [” Why did you leave your job?”,” How is your salary now?”,” How is your salary expected?”]. God knows this was the first phone interview I’ve had since I started sending out resumes. I hadn’t prepared any questions like this before. In addition, I have been greatly impressed with your company ☺️”,” MY salary is XXX now, but our company has XXX besides base and I will raise my salary 🤪”,” actually I prefer platform and challenge to salary (dog head), but I still hope XXX 🤑” for basic salary requirements] so as to cope with the mud. After a little peace of mind, my sister told me about the structure and main business of my department, and then explained the following interview process. She made an appointment with me and added wechat.
“One side” is in quotation marks, because “one side” actually arranged a small project on wechat, and then appointed a time to check it.
I would like to express my special thanks to the HR sister in PingCAP. After adding wechat, she helped me coordinate the interview time and answered all kinds of strange questions. Finally, she prepared a surprise for me when talking about the offer. Interview experience directly full of stars <3!
One side
I had heard PingCAP was going to write a small project, and I was really excited to do it myself. The interviewer gave the project requirements that looked something like this:
After K8S is containerization, there are almost no debugging tools available in the application container. You can use the idea of Namespace sharing to start a container containing various debugging tools (such as Netstat, GDB) and add them to the POD PID, NET and other namespaces. Implement the debug function of any POD. Now we want to use the Kubectl plugin mechanism to implement a plug-in, used to debug any pod container, to achieve kubectl exec experience.
Since I couldn’t find time to work during the week, I started working on it every few days until Friday night, finished it on Saturday night and shared the project’s address on Reddit. I was lucky enough to receive more than 100 stars, which made me feel like “Oh wow, this round should be stable!” (It turned out to be almost the only interview I ever felt “secure” in…)
Second interview
The second interview was with me, a Cloud senior, who spent more than 50 minutes on wechat voice chat:
- I asked about my project experience and talked about two projects
- How about Kubernetes? Have you read the source code?
- In fact, I only read kubelet about k8S code before. I read apiserver, Scheduler and Controller-Manager all at the last minute, and my smile gradually appeared.
- What is Kubernetes Service concept, how to implement?
- You were talking about Informer, how is Informer implemented and what does it do?
- Have you ever used StatefulSet? What are the characteristics?
- How is the rolling upgrade of StatefulSet implemented?
- Now we want to upgrade only any node in StatefulSet for testing. What can we do?
- Later, when I remembered a new StatefulSet, the data in PV was lost. In fact, the correct way was to use partition mechanism, and the smile gradually disappeared.
- All resources in Kubernetes have version numbers specified.
- For the second uncertain question, I repeatedly told myself before the interview that “don’t force me to answer” and “if I don’t know the question, I will talk about the idea”. Therefore, I said that I had never read this code, but according to the design concept of micro-service API, the version number has different functions. The answer seemed to satisfy the interviewer, so he dug down:
- How many sets of code does the K8S server need to maintain if there are more than one version number?
- I don’t know how to write the k8S code. I can’t be sure. Holy shit), but if I were writing the code (pretending to be confident), I would just maintain a copy of the latest Model, and then design a version of Adpater to translate the old Model blah, blah, blah.” At this point, I’m a dead end
- OK, let’s talk about Golang.
- See if there is a problem with this code. Why?
- How is Goroutine scheduled?
- What is the relationship between Goroutine and kernel threads?
- Is there anything you want to ask me?
After the face of the general feeling of the answer, the in the mind a little uneasy. Results the next day HR little sister came to arrange three sides, a long sigh of relief.
On three sides
On the third side, I had a chat with the Leader of the whole department. The interviewer was very talkative (with a pleasant voice!). And the technology is very comprehensive, the whole wechat voice chat about 80 minutes:
- Introduce me to the responsibilities and challenges of the PingCAP team
- Why do you want to see opportunities and your future career plan
- I was working on a data synchronization project, which was about subscribing to MySQL Binlog, sink to search index, sub-database sub-table and business event subscription stream
- Why did you choose XXXX open source project in data synchronization? What’s the advantage?
- How to subscribe to Binlog of sub – database sub – table?
- How to solve the primary key conflict in the data source of sub – database sub – table?
- How to guarantee downstream consumption order of Binlog?
- How can atomicity of transactions be guaranteed downstream at consumption time?
- How to ensure the binlog order in this scenario
- Talking about a project on Kubernetes, asking for details and pitfalls
- What problems have you solved with Kubernetes?
- Talk about the surveillance alert project I was working on, ask about background and output
- Prometheus single instance data scale is not holding, what is the solution?
- Is there anything you want to ask me?
For the project of “data synchronization” in my resume, I have carefully reviewed the research documents and architecture documents I wrote in those years, and also prepared for being asked (empathy, I will also ask. This is exactly the kind of project I expect interviewers to dig for details). Finally was really asked the most is this project, really good luck 😁.
All around
When I arrived at the scene, two interviewers chatted with me for about 40 minutes:
- About the details of the Configuration Center project
- Why not use ZK and write your own configuration center?
- I was caught off guard by this question, so I had to confess: I was young at that time and wanted to brush up on experience, but later I realized that I should not repeat the wheel. Of course, the system turned out well in the end.
- How does the configuration center do service discovery? How do you do failover?
- What pits have you encountered with Kubernetes?
- What changes have been made to Prometheus?
- What changes have been made to Alertmanager?
- How does the monitoring system do “self-monitoring”?
- How to monitor cross-room network problems?
- Is there anything you want to ask us?
Four sides is pure project, the experience inside is not quite universal. But there was one detail, and at the midway point the two interviewers checked each other out and said, “Any questions?” I realized the interviewers were running out of questions, and it was only about 20 minutes (too short an interview is bad smell). I tried to be as specific as possible about the following surveillance questions, while also mentioning that “there’s another area where we were doing a lot of work at the time”, hinting that the interviewer was looking for clues. I don’t know if it worked, but it was a close call.
Five surface
The end of the technical side is the fourth side, the fifth side is the founder’s side (I was lucky to talk about life with Cui Qiu for more than 20 minutes), and then the offer call is finished.
PingCAP summary
Some subjective evaluations:
- Interview difficulty: Normal
- Interview experience: I give full marks
- Question preference: Project experience, engineering ability
I really want to say a word about PingCAP (because the interview experience was great!). . The original intention of joining PingCAP is to feel that the team has a strong engineer culture, and there are many talents in it. Meanwhile, TiDB is excellent, and THE model of open source project is recognized in my heart. But there are many companies that sell dog meat, many JD write that engineers have a strong culture, in fact, many are not so true. However, after five rounds of interviews with PingCAP, I truly felt the engineer culture: there were no “tough questions” in the interview. Every interviewer was interested in my engineering thinking, learning ability and technical insights, and was very keen to discuss and dig some holes and make technical decisions with me. It feels good: the interviewer knows me, and my thinking and technical insights as an engineer are recognized and respected. It’s an atmosphere that can’t be sloganized, because it’s a hard requirement that everyone in this group has a passion for technology and a lot of engineering experience.
The ants
- Before the interview
- One side
- Second interview
- On three sides
- All around
- Five surface
- Six sides (HR)
- summary
Before the interview
Ant’s interview is quite unique. There is no HR appointment for each round of interview. Generally, the interviewer calls at around 8 PM to ask if the interview is available.
Six interviews, the first five technical interviews, telephone interviews, the last one is HR interview, on-site interview.
One side
- Introduce yourself
- Ask about project experience, talk about “data synchronization”
- Then we talked about the K8S project
- Is there any technology that you dig deeper into? (ME: Kubernetes, Golang, Prometheus, Java)
- What is the architecture of Kubernetes?
- This problem is very big, which is divided into Apiserver, controller, Kubelet and Scheduler
- Golang vs. Java
- This was a big question, and I was comparing VM, coroutine support, the difference between object orientation and generics, and my understanding of their respective usage scenarios
- Golang’s GC algorithm
- I know it’s a tricolor, but I can’t tell you the details
- Select 10 characters at random from an infinite stream of characters
- I haven’t seen it or thought of it, but I checked it out. It’s a reservoir sampling algorithm. It’s a classic interview question
- How to extend kubernetes Scheduler to handle large-scale node scheduling
- Single-node speed increase: Select some nodes randomly for optimization in the optimization stage; When scheduler nodes are extended horizontally, the pod does a consistent hash to determine which scheduler is scheduled
- What do you want to ask me?
On the one hand, it was a bit stiff. I didn’t let go at all. The interviewer didn’t give me any feedback or any depth. So I came out of the interview thinking I’d actually hung up (I sometimes just ask questions and go through the motions if I’m not interested in a candidate myself) and was surprised to get a second call.
Second interview
- We talked about the project first
- What changes were made to Prometheus?
- Self-research configuration center, what specific content did?
- Have you used any advanced features of MySQL?
- I asked what was an advanced feature, and the interviewer moved on to the next question
- How is the core data table in the configuration center designed?
- Why use Redis in business, what are the advantages of Redis?
- Single thread: concurrency safety; High performance; Rich primitives and data structures; Widely used, low cost of stepping pits
- Are you familiar with Redis data structure implementation?
- Said a zset skip list
- What data structures have you used in Redis and in what scenarios?
- What parameters can be configured to initialize a thread pool in Java?
- What JVM parameters have been tuned by your Java application, and why?
- I only know the basic things like Max heap min heap, open G1, open GC log and OOM Dumper
- Do you have any parameters when you use Jetty, and why?
- Would it be okay if the Jetty QTP wait queue was configured to be infinite? Will there be any problems?
- Which Linux Bash commands have you used and what do you use them for?
- A pen test: need to answer in the link given, can’t Google, can’t jump out, can’t use IDE:
The title goes like this:
Start two threads, one output 1,3,5,7… 99, another output 2,4,6,8… 100 last STDOUT output 1,2,3,4,5… 100
Me: I’ll do it with Go
Interviewer: No, use the Notify mechanism of Java
Me: (not realizing the severity of the problem) I’ll use Java BlockingQueue
Interviewer: No, please use Java wait + Notify mechanism to implement
I haven’t written wait + notify at all. You can’t write ‘go’
Finally, I realized a version with Go Channel, but I couldn’t run the code on the web page I gave, and I didn’t know if it was written correctly. Then the interview ended.
This time, the interviewer continued the style of the first interview, rushing to the next question after one question, without seeming interested in or recognizing my answers. So after this round, I feel dead again…
On three sides
- Still talk about the project first
- Interested in a project to monitor alerts, I asked a lot of details, and finally asked a question: Can you implement a query language whose semantics are not weaker than PromQL?
- I’ve seen some Prometheus code, but I haven’t really looked at PromQL’s Lexer and Parser parts. Thankfully, I’ve studied ANTLR a little bit in my data synchronization project because I wanted to write declarative Stream SQL. ANTLR write syntax + AST traversal plug query logic is fooled.
- What was the project I felt I had done the most
- Data synchronization, of course.
- Talk about data synchronization project (this is very much in line with my expectations, hahaha)
- How is Linux?
- Without systematic learning, it is basically accumulated by their own operation and maintenance
- How is Golang mastering it?
- Six months, effective Go
- How is the algorithm mastered?
- All the way up to the diagram
- Ask the shortest circuit algorithm
- I just remember Dijkstra, describing the code flow
- How’s your mastery of k8S?
- Not good. I have not written controller and Scheduler myself, but I am familiar with the concept. I have read the source code of XXX
- How is k8S exec implemented?
- This question is right up your street, and I’m very familiar with it from the PingCAP assignment
This round went much better. The interviewer seems to enjoy asking you to rate yourself: “How well do you think YOU mastered XXX?” (There were only five interviewers, so the sample was not big enough to count), in fact, I was scared to death of this kind of question. I was afraid that I would blow too much and not be able to answer it. I should have learned how to brag.
All around
- Introduce yourself
- How do you feel about your basic knowledge
- What data structures do you usually use?
- What are the advantages and disadvantages of linked lists versus arrays?
- How to determine if two acyclic singly linked lists have intersections
- How can I tell if two singly linked lists have an intersection
- How to determine whether a single linked list has a ring, and find out the ring point
- What is the difference between TCP and UDP?
- Describe how TCP waves four times
- The status of TCP
- What is the LISTEN state of TCP
- What is the CLOSE_WAIT state of TCP
- How to set up a socket connection
- What are the common HTTP status codes
- What’s the difference between 301 and 302
- What’s the difference between 504 and 500
- What’s the difference between HTTPS and HTTP
- Write an algorithm problem: hand type
This round of basic knowledge of the whole question, the foundation of a solid word no problem, but personally feel a bit like the school recruitment of the question.
Five surface
-
Introduce yourself
-
What secondary development has been done on k8S?
-
Have you ever built Chart with Helm? What are the?
-
Have you considered encapsulating your own DEVELOPment-oriented PaaS platform?
-
What does the configuration center do?
-
Why not Use ZooKeeper?
-
How does the configuration center ensure consistency?
-
Spring uses singleton beans. How to ensure concurrency safety when accessing Bean fields?
- Use concurrent safe data structures, such as ConcurrentHashMap; Or mutex
-
What if I also want to isolate data from two threads?
- ThreadLocal, and then gave an example
-
What is escape analysis in Golang? How do I avoid memory escape?
- I don’t know. I’m sorry
-
Compare Golang to Java GC
- In response to CMS, G1, and tricolor markers, my point of comparison is that the JVM has generational collection, while the Go Runtime does not
-
What is the GC trigger time for Golang
- Threshold trigger; Active trigger; Two-minute timing trigger;
-
Have you written Operator or Controller for K8S? (Me: No)
-
Talk about your understanding of microservices architecture
- “The essence of microservices is the evolution of personnel organizational structure and separation of concerns”
-
Talk about your understanding of servess
- Serveless is the boundary between application development and infrastructure providers following Docker and container choreography.
-
Do you think Serveless is the future? Why is that?
- The general idea is that the future of cloud services will take the pie out of the IT, operations, and middleware departments of the enterprise, creating economies of scale where the more you do, the more you make. In the company, Servless can help accelerate the front end business iteration, but the benefits of the middle back end are not yet visible. In the future, there may be a better architecture for the middle back end than Servless.”
-
Interviewer: What’s the last thing you want to ask me?
-
Me: Why did you arrange five rounds of technical sides, and two of them seem to have nothing to do with K8S?
-
Interviewer: We feel like you’ve done a lot of stuff and we want you to try it in every direction (my heart:……)
-
Me: So is this the last technical round?
-
Interviewer: Not necessarily (my heart:……)
I was quite interested in the last three water blowing questions, but the interviewer just listened to me and didn’t discuss them with me. In addition, I did not know until I asked the interviewer that the two interviewers were from PaaS platform, so I mainly asked About Java and did not involve K8S and GO.
Six sides
I’ve heard before that ali department HR is here to “smell” (see if you fit ali’s style) and has veto power. So it’s kind of stressful.
- Ask experience
- Why would you consider coming out?
- Golden sentence: “now their own technology growth a little encountered bottleneck, plus has been admiration for your company ☺️””
- What is the company’s main business now? (This is a lot of technical questions, I feel like I want to test my ability to explain complex problems)
- Are you bringing anyone now? What is the report level?
- Are you satisfied with your experience these years?
- What weaknesses do you see in yourself?
- Have you encountered anything frustrating?
- What are your future career plans?
- When looking at an opportunity, do you consider salary, platform, people or other factors?
- How are you being paid now
- Is there anything you want to ask me
The whole conversation lasted for more than 40 minutes, and the topic was quite broad. The interviewer also said that the pressure in System Department was great, and only the excellent people could stay. Personally, I don’t think HR has anything to prepare for except the part about salary. Just say what you want. Because when you go to HR, at least it proves that there is no problem with your skills, and speaking out is convenient for HR to judge whether the values on both sides are in accordance with each other. If they are really not in accordance with each other, it is better to fail in HR than regret and change jobs after entering, because after all, people do not like resumes that frequently change jobs.
summary
Some subjective evaluations:
- Interview difficulty: Normal
- Interview experience: Normal
- Question bias: basic knowledge, common sense of development, technical insight
Ants have a cold interview style. The content of the interview on the basic knowledge of the very heavy, no partial door and curious questions, solid basic knowledge of the students can be bold to cast ants.
headlines
- Before the interview
- One side
- Second interview
- On three sides
- All around
- summary
Before the interview
Toutiao will make an appointment with HR before each interview and send a ZOOM address in advance. The three technical interviews and one HR interview are all video interviews. I have to say that the video interview experience is much better than the phone interview experience (especially for people like me who pay close attention to the response of the interviewer). If HR students read this article, they should consider video interview instead of phone interview, which will be more efficient.
All three of the headlines have a similar technical style:
- Ask for projects and pick out areas or scenarios in which you excel
- Ask system design questions, each question will continue to deepen the requirements for you to adapt and weigh
- Ask an algorithm problem, first look at the idea, and then ask to write pseudo-code to see if the boundary conditions can be passed once
I myself have been using this interview process, especially the system design and the constant change of requirements, which can comprehensively investigate the basic skills and engineering thinking of the back-end. So the headline interview routine is right up my street, and I’ve even asked many of the same questions myself.
One side
- Introduce yourself. Why do you choose to look at opportunities
- Talk about the project, how did the alarm work, how did the unified access monitor work
- Chat project, configuration center project, ask how to do real-time configuration push
- Discuss why all component dependencies should be controlled in the configuration center
- Now I’m going to do a current limiting function. How do I do that?
- The token bucket
- This limiting should be distributed. How?
- The token bucket is maintained in Redis, and each instance has a thread to grab the lock. The one who grabs the lock is responsible for releasing the token on time
- How do you grab the lock?
- Redis setnx
- How to release the lock?
- After the lock is grabbed, the expiration time is set. When the thread itself exits, the lock is released actively. If the thread is stuck and the lock expires, other threads can continue to preempt
- After adding a timeout, there is no possibility that the lock will be snatched without release
- It’s possible. A single processing time is too long, and the lock leaks
- How to solve it?
- Switch to ZK. Use the heartbeat
- How to solve this problem without using ZK’s heartbeat?
- Each time an update expires, Redis uses MULTI to check whether the update time has been changed by another thread. If it has been changed, the lock has been taken away and the lock is abandoned
- If this limiting is to be configurable, it requires a backend management system to arbitrarily configure global traffic for an API. How to do this?
- Redis stores the token bucket key for each API. If this key exists, the flow limiting should follow the above logic
- A business needs to generate a globally unique increment ID. The concurrency is very large. How to do this
- Snowflake (this is not a good answer, snowflake can not implement global increment, can only implement global unique, single-machine increment, after the interview came up with a TDDL like take one ID segment at a time, put it in the local slowly allocated strategy)
- Algorithm problem, M by N horizontally increasing matrix to find the specified number
- I’m just thinking of order M plus N
- Is there anything you want to ask me?
Traffic limiting, distributed lock, UUID are all classic questions of the backend interview, this round of interview reference value is quite large.
Second interview
- What is the usual tool chain and technology stack
- Has Golang ever stepped on a pit?
- Answered the go-routine closure capture question in the for-range in the PingCAP interview
- Is there a bug in this Golang code (or a for-range pit)?
- There is a bug, for-range value reference copy problem
- How to resolve the storage, collision, expansion, and concurrent access of HashMap in Java
- Hash table, zipper method (length greater than 8 to red and black tree), double rehash, concurrent access insecure
- What are the advantages and disadvantages of the zipper method when the linked list is too long to transform into a red-black tree?
- Advantages: Faster O(LogN) read speed; Disadvantages: Overhead during insertion, O(LogN) insertion, rotation maintenance balance
- Where is the concurrency insecurity in HashMap?
- The zipper method resolves conflicts. It is unsafe to insert a linked list, and concurrent operations may cause another insert to fail
- Is there any special treatment for read and write operations in HashMap expansion?
- I don’t know
- How is ConcurrentHashMap concurrency safe?
- Segment section lock
- What locking mechanisms do Java have and what are their features?
- Synchronized, reentrant lock
- Do you know CAS? How is CAS implemented in Java?
- Compare and Swap, an optimistic implementation of locking, can be called “lock-free”. CAS needs to call the instructions of the corresponding OS to ensure atomicity, which cannot be implemented by JVM itself.
- What is the storage engine used by MySQL? Why InnoDB?
- Almost all companies use MySQL to use InnoDB, to reduce the cost of trampling; Clustering index, MVCC
- What is the difference between MySQL clustered index and non-clustered index?
- Leaf nodes of clustered indexes are data nodes (such as primary key indexes when primary keys are defined), and non-clustered index leaf nodes are Pointers to data blocks
- What are the differences between B+ trees and binary trees?
- A B+ tree is a multi-fork tree with smaller depth. A B+ tree can traverse leaf nodes sequentially, and a B+ tree can make better use of disk sectors. Binary tree: easy to implement
- Design the index for a scene, forget the specific scene, anyway is looking at the knowledge of joint index and column selectivity
- There is a new query scenario. How to solve it?
- A in () AND B in ();
- Select * from (A,B) in ((1,2),(3,4)); select * from (A,B) in (1,2);
- MySQL > select * from A in () AND B in ();
- First, a non-clustered index is used to search for travel data, and then another column is used to filter
- MySQL > query A in (); MySQL > query A in ();
- I don’t know. Those who know can leave a message
- What data structures have you used in Redis? How is ZSET implemented?
- Jump table
- Zrange start, stop, total length n, what is the complexity?
- O(logN) (答得不好,实际是 O(M+log(N)), M 是结果集基数 stop-start)
- How do Kafka consumers do message reduplication?
- MySQL de-heavy, Redis de-heavy, if the scene is very large and allows misjudgment, bloom filter can also be used
- Introduce Kafka’s ConsumerGroup
- Quite long, slightly
- How about Kubernetes and Docker? (ME: Preaching in the company)
- Did you contribute code to them? (Me: No…)
- What is the storage structure of a sequential database?
- The storage structure of Prometheus 1. X and 2. X is described
- LSM tree? What kind of storage structure is it?
- RocksDB, HBase, Cassandra are all used in the Log Structured Merge Tree. The structure of the Tree is forgotten, but it only says to write memtable first and then brush disk as Sstable
- Have you used Cassandra and RocksDB in production? How much is it?
- Yes, Cassandra stores the call chain, RocksDB does the local state store for Flink and Kafka Stream
- What is Cassandra’s tombstone mechanic?
- I don’t know, stay in the use phase for Cassandra
The second face asked a lot of basic knowledge of middleware, and finally did not have time to ask the algorithm. Java HashMap, locking mechanism, CAS index to MySQL, Redis zset, and LSM tree are all popular backend or middleware related interview questions. Of course, these questions are popular for a reason. Even if the candidate has prepared for them, a little more detail can quickly tell whether the candidate really understands or just read the relevant materials.
On three sides
- Talk about projects and work experience
- What potholes have you stepped in with Kubernetes?
- Consider a business scenario where a headline article has a large number of comments, such as a popular article with millions of comments, and design a back-end service that implements timed presentation and pagination of comments
- Me: Do I need to support page number direct jump?
- Interviewer: Consider both yes and no scenarios
- I: do not need to support page-turning on comment ID with offset page-turning
- How to design the database table if using ID page-turning mode? How is the index designed?
- (Article ID, comment ID) to create a federated index, the comment ID should be incremented
- If the quantity is large, do you think it is necessary to separate the storage and table? How cent?
- Need points, sub table has a tradeoff, according to the article ID sub table, read logic is simple, but write hot issues; Table by comment ID, the read logic is complicated, but the write pressure is even. Write is guaranteed first, while read is always compromised by caching and other schemes, so it is better to divide by average ID.
- How to query paging after sub – database sub – table?
- Merge a client or proxy to query N entries in each table
- How to ensure that the primary key is still increasing after the partition?
- TDDL: there is a table dedicated to primary key allocation, each time use optimistic lock method to try to get a batch of primary keys to allocate, if the optimistic lock failed to retry
- Now need to support deep paging, page number jump directly, how to implement?
- Do not do precise deep pagination, otherwise the pressure is too great, find the product compromise, after 50 or 100 pages can not be completely accurate data pagination, if so, then cache the start comment ID of the deep page number
- Instantaneous write volume is very large may hit the storage, how to protect?
- The circuit breaker
- What’s inside the circuit breaker?
- Can use the ringbuffer
- Circuit breakers cause write failures. What if we don’t allow write failures?
- First write into the message queue, peak load asynchronous drop library
- [{startTime, endTime}…] Calculate the maximum number of concerts you can attend
- First, the train of thought, according to the ascending order of endTime, and then the order of the maximum number of matches
- Share the screen with me and implement the algorithm in the language you’re most familiar with
- A version was implemented with GO
- You used greed. What might be the problem with greed?
- Locally optimal, in this case, you can only find one possible solution, not all permutations
I think the three aspects of the architecture design is not bad. One question tests the engineering ability of the back-end very comprehensively.
HR side
Similar, ask about experience, reason for leaving, career plan, salary, expectations.
summary
- Interview difficulty: Normal
- Interview Experience: Good
- Problem bias: architecture design, algorithm
Toutiao interview process is professional: each round is scheduled in advance, the interview lasts 40 to 50 minutes, and starts on time. After each round, feedback messages are sent to invite candidates to evaluate the interview, and the next round is scheduled exactly two days later. The whole thing is like a precision machine. I personally appreciate the interview in the headlines, because it is a comprehensive survey. The interviewer will grasp the points that you did not make clear to make you in-depth or change the scene to make you adapt. You can try to have a look around, even if you do not plan to go, it can also be a free ability assessment.
As for the interviewers, every interviewer could tell that they were writing code on the front line, and they were listening to me carefully (thanks to the video, I could see that the interviewers were listening carefully). I felt that they were easy to get along with and cooperate with in the work.
conclusion
Looking back at the interview process, there were many unsatisfactory things, but finally I was lucky to get three offers. Finally, some supplementary summaries:
Some lessons:
- Be prepared for projects on your resume and areas of “mastery” or higher proficiency and middleware. When an interviewer asks you a wide range of questions, he or she doesn’t expect you to answer them. When an interviewer asks you a question about your resume, if you can’t answer it, the interviewer will think that the person is either too low in vision and thinks he has mastered it after a little bit, or lying about his resume, both of which are very unfavorable.
- Build on the above tip and prepare a favorite project that you can point to on your resume and during the interview.
- Come into the interview with a methodology in mind: Identify the qualities the interviewer is looking for in the candidate, and try to reflect those qualities during the interview. This may sound like truenonsense, but there are so many factors in the interview process that you can’t control, and having a clear goal in mind can help you figure out what to say when you feel overwhelmed. For example, in one round, when the interviewer asked me if I had any questions, I asked about the technical challenges that the corresponding positions in your company would face (of course, it should be made clear that this is not to argue that they do not have challenges, but that they are eager for challenges).
Some information and insights in various fields:
- System Design Primer, a must-see guide to architecture Design. Keep in mind that the essence of architectural design is to use engineering experience to make the best trade-offs with a deep understanding of the business scenario. One way of doing an interview is to outline what you are giving up in exchange for it.
- Cloud native, Kubernetes Concepts section recommends looking again, Aggregation layer, kubelet pod state synchronization, scheduler scheduling, and Sample Controller controller
- For language, I recommend Effective Go, Effective Java, both very thin. I have read these two books before, so I did not prepare language for the interview.
- Algorithm related, this part OF my pure tanager, to tell the truth, I think the university textbook “data structure and algorithm analysis” is written very good… As for Leetcode, I did not brush it before the interview. Recently, IN order to practice Rust, I have brushed more than 60 questions, but I did not come across any questions that appeared in the interview. It seems that if you want to brush Leetcode, you have to go through more and brush more, and brush less and try hard to achieve strong luck.
- Golang for Range: Two rounds of interviews covered this topic, posted here;
(Full text)