Interviewer: What is the ZAB protocol?

hello! Hello everyone, I'm Xiaoqi, an unreliable programmer.
Xiaoqi intends to share some techniques in a relaxed and humorous way. If you think you have learned something through Xiaoqi's article, then give Xiaoqi a like.
The article is continuously updated, you can search for [Xiaoqi JAVA Interview] on WeChat to read it as soon as possible, and reply to [Information] and there are more benefits I have prepared for you!

I. Introduction

It's getting hotter and hotter today, but there are still many offline interviews. Although I really don't want to go there, I can't help it. Who made us a migrant worker? . . (Gan..)

insert image description here

Today's interview is not far from Xiaowo, so I got on my little bicycle and came to the crossroads before I knew it.

insert image description here

Looking at the bustling streets with people coming and going, I felt as if I had come to the crossroads of my life. Not only did I sigh, the world is so big that there is no place for my Xiaoqi, ah, heaven, earth

Passerby: The human riding a bicycle in front, the green light is on, can you walk? If you want to write a poem, is it better to stick to the roadside?

Me: go, definitely go, if you don't go you'll be late. . .

insert image description here

Finally came to the company to be interviewed, oh, this company is very stylish, 1, 2, 3, 4, 5, 6, 7, 8, 9, a total of 6 floors. . .

insert image description here

As soon as the elevator door opened, the lady at the front desk received the reception, and there was no call to leave the door as everyone expected. . .

insert image description here

Front desk lady: Hello, who are you?

Me: I'm here for an interview.

Front desk lady: Who is your contact person?

Me: Chef Fan

The lady at the front desk: Chef?

Me: I'm sorry, I've said that, Chef Fan is the receptionist of the restaurant I'm going to interview in the afternoon. It's Mr. Ma who contacted me here.

The lady at the front desk: Do you still interview the chef?

Me: No way, who makes your industry so involved, and dismisses people at every turn, I have to start a side business too. . .

The lady at the front desk: Makes sense. . . Fill out these forms first.

Huh, I was given a half- pound watch. I'm here for an interview , not to practice calligraphy .

insert image description here

What constellation, what blood type, what family, what background, what origin, what is a happy star. . . What are these questions? I'm here for an interview, and I'm going to be imprisoned. Forget it, after two hours of writing, I finally finished it.

2. Interview

Interviewer: Xiaoqi, right? Are you tired on the way here?

Me: I'm not tired on the road, but I'm a little tired after filling out the half-pound form. . . Is our company too much paper to use up? When I run out, I will take some home and use it as toilet paper.

Interviewer: Haha, if you answered well in the interview, I will let you take whatever you want

Me: OK, then you can ask.

Interviewer: I see that you are proficient in zookeeper on your resume, right?

Me: It's all touted by various interviewers, but it's actually okay, average, the third in the world. . .

insert image description here

3. ZAB protocol

Interviewer: Then tell me what the ZAB protocol is.

Me: What is the "Eighth" agreement, why haven't I heard of it?

Interviewer: Aren't you proficient in zookeeper, the zab protocol in zookeeper

Me: Oh, then I see.

Me: The full name of the zab protocol is: Zookeeper Atomic Broadcast (Zookeeper Atomic Broadcast Protocol).
zab is mainly an implementation method designed to solve distributed consistency.

Interviewer: What kind of consistency do you solve?

Me: To solve the data consistency problem, we need to ensure that the data in the leader is consistent with the data in the follower.

Interviewer: How can we ensure consistency?

insert image description here

Me: After the leader receives the message sent by the client, he does not save it first, but sends it to the follower node first. When more than half of the follower nodes give him the corresponding success, he asks the follower to save the data, and then saves it himself data.

Interviewer: Can you be more visual? I don't understand this picture.

Me: I don't understand, turn left when you go out, walk slowly and don't give it away. . .

Interviewer: Okay, oh no, I'm the interviewer, you're here for the interview, I shouldn't be leaving

Me: OK, then if you don't leave, I'll tell you in detail.

Interviewer: Good

Me: Now let's play role-playing. I'll play the emperor, can you play the eunuch?

Interviewer: Good

insert image description here

Me: Today at noon, the imperial kitchen brought my favorite hard vegetable Mushu meat . I definitely can’t eat it directly at this time. I will definitely give the eunuch, that is, you, to taste whether it is poisonous. If it is not poisoned, I will eat it. right.

Interviewer: Yes, then why must more than half of the eunuchs think that you can eat it without poison?

Me: Stupid, if there is only one eunuch, then if he is bought, I will definitely hang up, and multiple eunuchs must say that there is no poison.

Interviewer: Yes, then why not let all the eunuchs have a taste, is half enough?

Me: I have 800 eunuchs, if they taste it, I will have nothing to eat. . .

Interviewer: Yes, yes, the emperor is wise

insert image description here

Interviewer: The guy is really amazing, let me experience the principle

Me: This is nothing, I want to feel that we will continue to role-play when I join the job.

Interviewer: Okay, then you can come to work tomorrow, no, take the throne now

Me: Is it so sudden? . .

4. Summary

The zookeeper here has not been sorted out, and the article will continue to be updated later. It is recommended to collect it.

The commands involved in the article must be knocked several times like me. Only in the process of knocking can you find out whether you really master the commands.

If you think my article is not bad, please like it. In addition, you can search [Xiaoqi JAVA Interview] on WeChat to read more good articles and get the information I have prepared for you.

Guess you like

Origin blog.csdn.net/weixin_44096133/article/details/124045193