Interview questions shared by a veteran with three years of development experience

I picked some distributed-related interview questions and listed them briefly, but they are not complete. I will fill them up when I have time.

The purpose of our interview: talk about actual scenes in combination with the project, not playing with concepts, not playing with virtual things.

Generally, after answering the questions, follow-up questions will be based on your answers, so the interview questions are for reference only.

This is an interview question on the one hand, on the other hand, it pays attention to the breadth of technology, so the question is not difficult.

1. Distributed Theory

Briefly describe the CAP theory

Describe the technologies used in your project according to the CAP theory. What are the models?

Briefly describe the BASE theory, and explain which parts of your project involve this theory?

2. Redis

What is the qps of stand-alone Redis?

Which Redis data types are used in the project? Why is it used like this?

Is the Redis key deleted when it expires? Briefly describe the expiration strategy of Redis?

What kinds of memory elimination strategies does Redis have? (You can contact the sorting method of linkedhashmap here)

Why is Redis so fast? Can you talk about Redis's threading model?

What should the Redis cluster solution do? What are the options?

Which Redis cluster is used in the production environment of your project? How is it deployed online?

How does Redis persistence in your project?

Describe the Redis avalanche and penetration, and how to avoid it in your project?

Does your project use Redis for distributed locks? What is the difference between Redis distributed lock and zk?

How to ensure the consistency of the cache and database double write? (This problem can be discussed very deeply, the general primary solution, the solution under high concurrency)

How do you estimate the memory space occupied by Redis in your project? How to avoid data loss due to excessive memory usage?

How does Redis expand in your project? Please briefly describe the consistent hash algorithm (better draw a picture?)

3. zk

How is zk deployed in your production environment? Does one work? 3 units? 4 units? 5th floor?

Why is the number of nodes deployed in a zk cluster singular?

If the leader node of zk goes down and a service comes to register at this time, what will happen?

If the service is registered to the leader of zk, but the leader has not had time to synchronize to the follower, what will happen if the leader dies at this time?

How does zk guarantee high availability? (This is a trap question, here can be extended to why Ali does not use zk as the registration center)

Tell me about the election process of zk?

Talk about the data synchronization process between zk clusters when the service is registered

Talk about the herd effect of zk clusters

4. eureka (usually compare with zk)

Briefly describe the difference between zk and eureka (prompt cap, cluster mode)

What optimizations have been made to eureka in your production environment?

Can you draw a diagram of eureka's architecture (including service discovery, bottom-level cache synchronization, service detection, heartbeat, service offline, synchronization between cluster nodes, etc.) This problem is very big. If you understand how much you understand the underlying principles, you can talk about it for half an hour Kind

Can you talk about the comparison of timeliness between zk and eureka?

Have you ever encountered a newly released service, but it will be called by other services after a long time (tens of seconds or even a minute)

Can you swap out eureka's three-level cache architecture diagram and cache synchronization diagram

5. dubbo

What technologies are used in the registration center, configuration center, and gateway in your project (see if you come out of the training class)

Can the service be called remotely after zk hangs on dubbo?

What service information is stored in zk?

Can you draw a diagram of the dubbo architecture?

Briefly describe the dubbo process, including service registration, service discovery, remote invocation, load balancing, communication, etc.?

How do you set the dubbo timeout period and the number of dubbo retries in your project? why?

Talk about the difference between dubbo and cloud. If you are asked to choose the technology, how to choose?

If you design an rpc framework yourself, what ideas do you have?

Are the get, post, put, and delete requests idempotent?

For different request methods, let’s talk about how you do interface idempotence design based on your actual business?

What are the solutions for distributed transactions, and what are the advantages and disadvantages of each solution?

Which parts of your project involve distributed transactions, and which scheme is used? Why adopt this scheme?

6. sqm

Which business uses what mq in your project? Why use it, and what's the problem if you don't use it?

How do you choose your mq? Can you talk about the characteristics and applicable scenarios of rabbitMq, kafka, and rocketMq?

How do you ensure the high availability of mq?

How to ensure that mq does not repeat consumption?

How to ensure that mq does not lose messages?

Can you draw the framework of kafka/rocketMq?

Guess you like

Origin blog.csdn.net/weixin_45450428/article/details/104602503
Recommended