During the interview with Ant Financial for an hour and a half, Miss Personnel helped me win the offer with God's assistance and presented my review book!

Little sister before the interview

Let’s talk about the previous situation of Ant Financial. It is also a coincidence that at the time, a young lady from Ant Financial in the group posted an internal tweet. After looking at JD, she felt that she could give it a try, so she chatted with her privately and posted an internal tweet.

Personally, the interview experience is really very small, no more than one palm. Therefore, after I sent my resume to my young lady, I contacted her and asked her to post it later and asked me to find a few companies to practice.

But Miss Sister said that she could warm up for me first. She is also an interviewer (Miss Sister is really great!). I spoke with Miss Sister for more than 20 minutes at night. Although it is not the specific interview content, the content Dryer than this! She and I talked about the direction and focus of the general question on one side and two sides, and some points to note:

one side:

Miss Sister: I will first give two programming questions, choose one of the two, it will not be a difficult algorithm, it is more pragmatic. Basically, it can be written by first-line programming all the year round. It is to send a link to your mailbox, and then click on the link to program online. There is no code prompt, and it is basically gone if you can’t write it.

Me: If some methods are hard to remember, can they be written and copied in idea?

Miss Sister: You can mention this to the interviewer, but in my case, the score is reduced. And if you write code in your idea, the interviewer may run the code instead of visually inspecting it. If you haven't run it, it's basically gone.

Me: oh oh good, good.

Ms. Sister: Then I introduce myself, focusing on basic aspects, such as locks, GC, common collections, etc. According to your resume, for example, I think you wrote dubbo on your resume, so I will ask some questions about dubbo. It's almost done after a lot of talk, about half an hour at a time.

Me: oh oh good, good. By the way, how long will it take to notify you? Will the cycle be long?

Miss Sister: Basically, there will be results within 2-3 working days.

Two sides

Ms. Sister: If you compare the project on the second side, you will basically be asked to describe the overall structure of the project, how to flow data from where to where, the tps, qps, etc. of the project. Basically, if you can’t answer, I think you are not the core of the project. personnel. Then why is it designed this way, and what are the optimization points? This is to check if you have enough thinking about your daily work.

Me: Oh, okay, okay (trembling)

Three sides, four sides

Miss Sister: Emm... You'll talk about it after a while.

Me: yes yes yes! Look at the moment.

In fact, I really want to invest in a few companies first and find the rhythm first, but I can only face life when my lady said that! After two days, the interviewer called, made an appointment a few days later at 7 o’clock in the evening, and pointed out the need for a computer (I’m sincerely not deceived by my little sister), I asked if I need a camera, answer: No, it’s OK to be able to surf .

Attached below is my review book. This is the information I compiled based on the interview questions of major companies, and some notes I wrote, including basic knowledge, Java collections, JVM, multi-threaded concurrency, spring principles, microservices, and Netty With RPC, Kafka, diary, design pattern, Java algorithm, database, Zookeeper, distributed cache, data structure, etc. Friends in need can click here to remark csdn to get it for free, sincerely waiting for you to get it, hope it will help you!

Interview body

In fact, I also forgot whether the appointment was at 7 or 7:30. Anyway, I sat in front of the computer at 7 and waited. I was so excited that I couldn't eat enough to wait until 7.35. I finally waited until you were okay and I didn't give up! !

Hearing the gentle little brother's voice on the other end of the phone, he finally came! I have opened the mailbox and waited for the programming questions to come!

Brother: Let's introduce yourself first.

Me: emm? ? ? Didn’t you say that you should do two questions first? Maybe you should introduce yourself before doing the questions? So I just talked about Barabara for 20 seconds, talking about being interrupted when the company is doing part of the front-end development.
Brother: Tell me about your feelings about writing the front end?

Me: A large part of the reason why I want to change jobs is because now I need to do the front-end, the front-end is not very attractive to me, although the positive feedback given by the front-end is more obvious and timely for the back-end, but I am more I like the feeling of silent output behind the back end.

Little brother: Yes, the front end is much simpler than the back end. A few frames are basically enough. The ceiling is relatively low.

Me: Yes, yes, there are too many things on the back end, and it involves a wide range of things (front-end listeners, the words above are from the little brother, the original words, I can’t help but I can’t help myself, right? Please Hai Han)

Little brother: Looking at your resume, you wrote Dubbo, Redis, RocketMq, can you pick one of your most powerful ones?

Me: (I wipe it, I personally think this question seems to be for me, but in fact it is a hidden murderous intention) Redis, right?

In fact, my brain quickly filters and feels that redis is relatively stable. I think all I can ask is:
Why is redis single-threaded? IO multiplexing?
The advantages and disadvantages of redis and memcached?
Five objects of redis? The underlying data structure of each object?
Redis Bloom filter (I can also extend a cuckoo filter for you), hyperLogLog (I also tell you it is based on Bernoulli experiment)
Redis expired deletion mechanism? Elimination mechanism?
RDB and AOF of redis?
Redis business?
The master and slave of redis? Sentry? Cluster?
Redis distributed lock? redlock? (Come on, Martin God has said all the content of the author who just redis)
Some optimizations of redis? Big key split? Return in batches through the cursor to avoid blocking by commands such as key*? Swap prohibited? Consider memory fragmentation and so on?
If it feels stable, let's redis!

Little brother: introduce redis cluster

Me: (Come here!) The redis cluster divides a total of 16384 slots into the nodes in the cluster. Each node learns the information of other nodes through gossip messages, and records the information of all nodes in its own clusterState. And the allocation of the slot array

Brother: How does the client access the cluster?

Me: The client will first visit a node in the cluster. If the slot is hit, it will directly access it. If it is not hit, it will return the MOVED instruction and inform the slot of the node that actually exists, and then visit it. (There is actually a migration situation here. If the accessed slot is being migrated, the ask command will be returned, and the client will be directed to the target node to find it)

Brother: Does your company use clusters?

Me: master and slave

Brother: Do you know Guan Xiaotong?

I:? ? ? (Under what circumstances is this span so large?)

The little brother immediately said: It was the situation where Lu Han had linked up Weibo.

Me: oh oh know know

Little brother: Weibo is such a big company, and there are so many accidents of this kind? Why does it hang up?

Me: (I wiped it, why do I still hang up after so many cases! Such a large company has a very good monitoring service, and the combination of automatic expansion and contraction of the alarm shouldn’t hang up. Why did it hang...) I weakly said a hot key issue? Too hot to withstand

Brother: How to deal with it?

Me: First of all, to ensure the hot key expiration problem, assign random expiration time to different hot keys to ensure smooth expiration. Then you can set a distributed lock in Redis, only the request to obtain the lock can penetrate the database, ensuring that only one request can penetrate the database at the same time to update the cache.

Little brother: No, I didn’t mean that. I was asking how to solve this hot key access?

Me: You can divide keys by hash, split a key into multiple keys, and distribute them to different nodes to prevent a single point from overheating. For example, a key is allocated to a node before, and I split the key, like a virtual node of consistent hash, to decentralize access.

Brother: Do you talk about consistency hashing? What is the difference between that and ordinary hash?

Me: The consistent hash virtualizes the hash space into a circle. The key is hashed on the circle, and the search is clockwise. The first cache node encountered hits. Avoid uneven cache distribution through virtual nodes, and after a node hangs up, the nodes below only need to bear part of the traffic and will not hang up because they need to bear all the traffic, and then an avalanche occurs

Brother: Okay, let's go back to the problem just now. What you just said is a solution. Is there any other solution?

Me: (And? I’m really gone, I thought for ten seconds, and I didn’t know it) I don’t know.

In fact, there is a local cache, just a HashMap, Guava cache or Ehcache. Use local cache to deal with extremely hot data.

Brother: Okay, let's talk about MQ

Me: (Little brother looks a little disappointed, hey, he shouldn't, but my mind just can't remember...) Common ones are RocketMQ, KafKa, etc. RocketMQ is more suitable for business, focusing on optimization of delay. Kafka has a higher throughput because of the idea of ​​gathering a wave, and it is suitable for big data scenarios, not suitable for business.

Brother: What does it mean to save a wave?

Me: Save a wave is to send messages one by one by default, but wait for a wave to send again (in fact, the idea of ​​saving a wave is very common, such as tcp's Nag algorithm, pageCache batch refreshing, etc.)

interview result

At the end of the article, I want to say that you must pay attention to repetition before the interview. As long as the review is good, the interview will not be tense. Here is my review book:
Insert picture description here
Insert picture description here
Insert picture description here

For the interview with a big factory, I want to emphasize that the mentality is really important. It is the key to determining your performance in the interview process. If you can’t perform normally, it’s likely that you missed the offer because of a small mistake, so you must pay attention to it. Get up, the above information is available for free. Friends in need can click here to comment on the csdn to receive it. I hope to help you and help you get your favorite offer. Finally, I still wish everyone, ask for a wife, a wife, and a child. Son, ask for an offer.

Guess you like

Origin blog.csdn.net/jiagouwgm/article/details/110291497