The sharing of this interview came from my brother who played king with me very early. Why was he so impressed? Because he was a thief, I saved a note for him alone.

This time lasted for two months, and he got a lot of offers. Congratulations to him for getting the coveted Offer from Ali.

The usual invitation, of course, is to share a wave of experience.

However, this time is the most perfect arrangement in my book, and I can send it almost without any modification. Thanks again for his sharing.

Best Logistics special performance

One side

  1. Online SQL tuning experience. Conventional thinking for tuning.
  2. Why index B+ tree instead of B tree, red black tree.
  3. In the MQ application scenario of the project, how to prevent consumption loss and repeated consumption?
  4. JVM class loading mechanism (parent delegate). CMS garbage collection process.
  5. Use of design patterns in projects.
  6. How can I improve the response time of my interface?
  7. MyBatis framework cache.
  8. How to implement a lock yourself. (Answer based on AQS)
  9. How to solve the problem of Redis hanging? (Add local cache)
  10. The seven-layer model of the network. What does each layer do? (In my answer, I said I was based on a five-tier model.)
    • Three handshakes. Why three?
    • Why IP?
    • HTTPS Process of sending a request.
  11. How is Eureka tuning tuned? Self-protection mode.
  12. The flow of distributed transactions? (LCN)
  13. What is the principle of current limiting? What are the common algorithms for limiting traffic? Reject policy after traffic limiting.

Second interview

  1. Hand tear to achieve a multi – fork tree, traversal print.
  2. A single case of hand tear.
  3. Deadlock generation.
  4. How do you prevent deadlocks and how does OS do it? How does MySQL do this?
  5. How to avoid deadlocks when writing code?
  6. A hashmap.
  7. What is high cohesion and low coupling?
  8. How the open closure principle is implemented in the project, and how to customize beans.
  9. How are bean loop dependencies resolved?
  10. MySQL index implementation principle. Why do fast?

On three sides

  1. Why did you leave?
  2. Current salary? Expected salary?
  3. Introducing the business, what do you think is the core?
  4. Is there anything you want to ask me.

Light cloud technology

One side (30 minutes)

  1. What problems were solved in the project?
  2. How is database transaction ACID implemented?
  3. How does mysql resolve deadlocks?
  4. Use of distributed locks
    • Why Redisson?
    • What if Redisson dies?
    • Why can Redis implement locks?
    • Are there other ways to distribute locks?
  5. Redis persistence
  6. Depots table
    • Why separate database and separate table?
    • Have you had any problems?
  7. Talk about CAP as you understand it
    • If you were to design a system, what would you do according to CAP theory?
  8. Have you used MQ?
    • Technology selection, why RocketMQ?
    • Has there been a failure to write messages to MQ online?
    • What if the RocketMQ consumer fails to send a message? (Put Redis, what if Redis dies?)
    • What about the RocketMQ message heap?
  9. dubbo + zk
    • Why dubbo uses ZK instead of Nameservice?
    • Can dubbo be called when ZK is dead? Can it be called after a restart?
  10. Is there anything you want to ask me?

Second interview (40 minutes)

Two interviewers

  1. Talk about the optimization of the second single module in the project.
    • What is the concept of bandwidth?
    • Consider using machine LAN in the same machine room? If go LAN, how does the network go?
  2. Chat MQ
    • What happens when MQ fails to write messages? (As with the first problem, I just say the solution, redis, local memory)
    • How many ways a producer sends a message, and the differences.
  3. Nginx chat
    • Why is Nginx so fast? (No, but I guess epoll)
    • Let’s talk about the common IO model for Linux. (5)
    • Epoll edge trigger and level trigger understand?
    • Disadvantages of epoll.
  4. MySQL
    • Draw the MySQL architecture diagram.
    • How can I lock the problem and resolve it quickly?
    • The same query statement, sometimes fast and sometimes slow, what causes? (Brushes dirty pages) What else? (No)
    • Design a commodity category database storage, query time complex read said. How to optimize? (Here’s the best solution you can think of)
    • How to tune online SQL?
    • Say File Sort.
    • How does MySQL sort?
    • Disk + memory sort
    • What would trigger this?
    • If the disk + buffer sorting method is used, what is the most basic sorting algorithm? (Merge sort)
  5. Does DDD understand?
  6. Is there anything you want to ask me?

Three sides (30 minutes)

  1. Introduce the business and product line of the division.
  2. Ask me why I joined (high concurrency, can exercise myself)
  3. When you encounter time limit is not enough, you think the optimization has not finished how to do?
  4. Our department has a large amount of concurrency, but you just came to CRUD, what do you think?
  5. How did you figure out how to use the new company quickly after you arrived?
  6. How many offers did you get?
  7. Do you have any questions for me?

Four sides (10 minutes)

HRBP

  1. Let me introduce myself.
  2. What is your normal state of life?
  3. What is the most fulfilling project you have ever worked on? Why is that?
  4. The team was introduced.

Five sides (10 minutes)

HR for recruitment.

  1. Expected salary.
  2. Why join us.
  3. Leaving reason
  4. Time of entry.

Future technology

One side (40 minutes)

  1. Introduce the project and problems encountered during the project.
    • Optimization of seconds. What if Redis dies?
    • How does MQ prevent loss?
    • Why did RocketMQ adopt NameServer
  2. How does the online OOM trigger? How to find the problem quickly?
  3. SQL slow query problem encountered online?
    • How to lock the problem quickly?
    • How to do the optimization?
  4. How would you design a RPC remote call framework like Dubbo?
  5. Say what you understand about thread-safety
    • Thread-safe way?
    • What other way is there to lock it? (Single thread thread safety, I answered redis, here should answer ThreadLocal)
    • Ever used ThreadLocal? For what? His essential idea? What should I pay attention to? What is the reason for his thread-safe approach?
  6. Use of design patterns in projects
    • The strategy pattern
    • Template method pattern
  7. Why is Redis so fast?
    • Let’s talk about a common IO model.
    • Is it possible to use master slave Redis as a lock? What’s the problem?
  8. Have learned what knowledge, read what source code? You just said you read the source code forget you are how to solve? (Draw a flow chart and read it several times)
  9. Is there anything you want to ask me?

Second interview (30 minutes)

  1. Draw a business architecture diagram for the project.
  2. What problems did you encounter in the project?
  3. What problems have you solved in your projects?
  4. How do you study?

Big search car

One side (60min)

  1. What do you think technology growth looks like?
  2. Introduce your best project
    • Describes the architecture of the project.
    • What do you think are the strengths of your project?
    • What is the structure of your project?
    • How many nodes?
    • Talk about where your data flow is going.
  3. How did you optimize the Eureka line?
    • What else does the registry know?
    • What is the difference between Eureka and ZK?
    • Here’s how Nacos works
  4. MySQL
    • Optimization of online statements?
    • Let’s talk about the process of optimization.
    • Why is the index fast?
    • Let’s talk about B plus trees.
    • Why can’t red black trees work?
    • What’s the difference between a red-black tree and an AVL tree?
    • What is the maximum number of rotations a red-black tree can undergo? (Forget)
  5. How is the custom Bean container designed?
    • If you could optimize this design how would you optimize it?
    • Can custom annotations be implemented? (Not here, don’t know how to implement)
  6. JVM
    • How to check the OOM online?
    • If there is no OOM online, but my application throughput suddenly drops, can you guess the reason? (a Full GC)
    • So let’s talk about CMS and G1
    • What’s the biggest advantage of the G1?
  7. Redis
    • Introduce the use of online Redis.
    • What if Redis dies?
    • How to ensure that the local cache and redis and mysql data consistency
    • Delayed dual-delete policy.
    • How is redis cache penetration resolved?
    • How is the Bloom filter implemented?
    • Does the length of the Bloom filter vary between 10W data and 1W data? How big is it if it stays the same? (This should be answered in combination with the error rate)
  8. How can ConcurrentHashMap be thread safe?
    • What is thread safety?
    • Where are HashMap threads unsafe? (Multithreading is not safe during capacity expansion)
    • Why is the length of the HashMap array to the power of 2?
    • Let’s talk about expansion.
    • How is the bit operation computed when the data falls into the hash slot without taking the module? (array length -1 & hash)
  9. Is there anything you want to ask me?

Wedding ji

One side (60 mins)

  1. Describe a problem you encountered in your project and how you solved it.
    • Online SQL tuning, problem solving.
    • Common SQL optimization solutions
    • How to tune Eureka parameters?
    • Does the Ribbon use the same cache as the Eureka Client for remote calls?
    • What if old services are taken offline in a timely manner when new services are launched? (Manually offline)
    • How is the circuit breaker done?
    • Talk about the principle of his fuse
    • Callback synchronous or asynchronous?
  2. SpringBoot
    • Talk a little bit about auto-assembly
    • For example, when configuring multiple DataSource, which Bean will Springboot load first?
  3. For a balance module, how to update the balance and insert the flow in order? (Anything is fine, as long as it is in the same transaction)
    • How to ensure the data security of the balance module, query out to modify the operation. (Add a lock to the code, database for update or an update statement or use optimistic locking to increase the version number in the database)
    • How to improve the interface response speed?
  4. MQ
    • Why is RocketMQ so fast? (Zero copy is key)
    • A word on MQ persistence.
  5. MySQL
    • SQL between and and in.
    • How to choose between a unique index and a normal index?
    • Let’s talk about index push-down.

Yintai

One side (60 mins)

  1. Describe the most complex projects you have ever worked on and problems you have solved online.
    • SQL tuning, OOM, single second optimization.
    • What was your biggest contribution to the project?
    • What challenges and growth did this project bring to you?
  2. How to ensure system stability?
    • Current limiting, degraded fusing, multi-node, alarm information.
    • What are the limiting algorithms?
    • Does the token bucket set to 10 mean the QPS Max is 10?
    • How to select cluster traffic limiting and unit traffic limiting? (Both)
    • What is the difference between fuse downgrade?
    • Is there anything else you’d like to add to that?
  3. Distributed transaction
    • The solution in your project
    • Name a distributed transaction solution that you think has the highest QPS.
  4. redis
    • What was redis used for in the project?
    • What else can Redis do. (Explained the use of the five data structures, as well as distributed locks.)
    • Why is Redis single thread fast? What are the problems with multithreading?
    • Distributed lock chat.
    • How does Redis implement reentrant locking?
  5. MQ
    • Use of MQ in the project.
    • What if the message doesn’t fit in?
    • What if I can’t consume messages?
    • When can messages be lost?
    • When messages are redelivered.
    • How are sequential messages guaranteed? How do you ensure that messages are consumed in sequence if they are not written to the same queue?
    • Why is RocketMQ fast? (Difference between Mmap and SendFile, introduction of DMA getter mechanism)
  6. Have you known about the sub-database sub-table? How to divide database and table?
  7. Did DDD know about it?
  8. Is there anything you want to ask me?

Have a great

One side (80 mins)

The interview is divided into three parts and lasts about one hour.

  1. HashMap
    • Talk about what you understand about hashmaps.
    • The complexity of a HashMap query is O(1) how it is implemented. (Because arrays are stored in memory as contiguous memory space)
    • Is thread safe? Where is thread insecurity?
  2. Thread-safe map
    • What about the JDK’s thread-safe Map?
    • How are thread safety implemented separately?
    • What do you know about thread safety? How to implement thread safety? (Lock, privatize variable thread)
  3. The thread pool
    • Let’s talk about thread pools.
    • Your online thread pool configuration, why?
    • Computation-intensive How and why are thread pool parameters configured?
    • How to dynamically configure thread pools?
  4. MySQL
    • Let’s talk about the architecture of MySQl
    • How is the ACID of a transaction implemented?
    • Describe your understanding of MVCC (high and Low water levels and current reading comprehension)
  5. SQL tuning
    • What are we tuning in general SQL? Let the optimizer select the correct index.
    • Your resume project line up the best experience to share. What causes the online accidents and how to find and solve them quickly?
    • Did you learn anything from the online incident? (We need to reserve our knowledge in advance, so that when problems occur, we can quickly lock and solve the problems)
  6. redis
    • How to handle cache exceptions?
    • Hot key problem handling.
    • Do you know what to do online?
    • What if there are not enough development cycles? (Work overtime on weekends to complete this problem)
  7. Distributed transaction
    • What is your solution for distributed transactions online?
    • Have you ever thought about the problem with your solution? How to optimize?
    • How does online compensation work?
  8. RocketMQ
    • Talk about RocketMQ transaction messages.
    • RocketMQ how do you keep messages from getting lost online?
  9. Separate database and separate table.
    • Do you have a separate inventory and table? (No, but I know the solution)
  10. DDD
  11. Talk about DDD as you understand it. (Just learning, some general concepts and some nouns)
  12. Tell me about your project (after a lot of talking, the interviewer stops asking)
  13. How do you learn?
  14. Is there anything you want to ask me?

Second Interview (60 minutes)

In person, the interviewer was enthusiastic. This side is all business. The details of the project are very fine.

  1. Draw an architectural diagram of your project.
    • What are the NGINX load balancing policies?
    • How did you optimize Eureka parameters in your project? Comparison of registries?
    • How do you understand CAP?
  2. MQ
    • How does Kafka compare to RocketMQ?
    • Transaction messages for RocketMQ.
    • How does RocketMQ implement sequential consumption? Is there a need for this in your program?
  3. Draw a sequence diagram of the main calls you are responsible for.
  4. Design of database tables in the project.
  5. What problems have you encountered on the project line?
  6. What problems have you solved in your projects?
  7. What was the biggest challenge you faced on the project?
  8. Has ES ever been used? (no)
  9. Draw what you think of as an e-commerce transaction link.
  10. Tell us what you think DDD is.
  11. What do you want to ask me?

Three sides (30 minutes)

  1. What problems have you solved in your projects? What does it give you to think about?
  2. What problems have you actively solved other than passively?
  3. How do you study?
  4. Why did you choose “like”?

HR (20 minutes)

  1. Why do you choose internal tweet like?
  2. What made you stay at your last company for three years?
  3. What has been your biggest challenge since you started working?
  4. How do you understand the business of the department you are interviewing for?
  5. Do you study regularly? How do you learn?
  6. What offers have you got?

rookie

One side (40 minutes)

Let’s start with the project. Each point in the project is very, very detailed.

  1. Introduce the project.

    The first project

    • Talk about the architecture of your project. (monomer)
    • QPS and data volume of the project.
    • What did you do in your project? What did you get?
    • Solving problems in a project gives you something to think about.
    • What if the traffic expands 100 times?
    • Why not do it when you have a solution?
    • How do you ensure the stability of your project?

    Second project

    • Describe the business and application architecture of your project.
    • Why did the architecture do that?
    • QPS and data volume of the project.
    • Again, a 100-fold spike in traffic, where do you think your system started to choke? How to solve it?
    • Your business is Top3 in the industry and developing very well. Why not optimize it according to your optimization ideas to improve its stability?
    • Talk about your solution for distributed transactions and distributed locks in your project.
  2. Thread safety

    • Syn lock upgrade.
    • What are common thread-safe containers?
  3. Spring IOC and AOP

  4. RocketMQ

    • Architecture.
    • How is message loss prevention done?
    • Transaction message.
    • How would you design an MQ?
  5. Is there anything you want to ask me?

  6. What offers have you got? How do you choose between the likes and us?

Second interview (written examination)

Ali Bole platform (equivalent to the white board), the interviewer set questions, and the interviewer need to call the state of writing code, you write the interviewer can see in real time. The syntax doesn’t have to be correct, as long as the logic isn’t too bad.

  1. Implement a bidirectional linked list of insert, find, delete method.
    • What is the complexity of each? (Note that the time complexity of inserting the head and tail is different from that of inserting the index.)
  2. Optimize the query time complexity of the find method. O(logN), O(1).

Three sides (30 minutes)

  1. Project related
    • What problems have you solved?
    • How to quickly lock the problem?
    • How to ensure project stability?
    • What is the application architecture of the project?
  2. Spring ICO and AOP
    • What is the difference between annotated and programmatic transactions?
  3. What was the biggest challenge you faced on the job?
  4. What is the biggest challenge you have faced in your life so far?
  5. Did the interviewer say you got a good offer? Which one would you choose, us or like?
  6. Is there anything you want to ask me?

Four sides (20 minutes)

Big boss interview, 10:00 p.m.

  1. What was your role in the project like?
  2. Do you think computer related basic courses are important? What other ways do you learn besides watching videos at Station B?
  3. What do you want from ari?
  4. The interviewer said that you got a favorable offer, how would you choose between us and favorable offer?
  5. What questions do you think I didn’t ask?
    • Didn’t ask about technology. (BECAUSE I can see the interview notes in front of me, I know what they asked.)
  6. Is there anything you want to ask me?
    • Advice for me?

Five surface

  1. Why join rookie?
  2. What do you usually do besides work?

All right, you know what I mean when I invite you to the King of Glory, don’t give me a cold answer.