As an excellent programmer, the technical interview is an inevitable part of the general technical interviewers through their own way to investigate the technical skills and basic theoretical knowledge of programmers.

Article reprinted: Le Byte

If you’ve ever had an interview with a large company, you’ve probably come across some questions like:

1. Look at the framework you use for your project. Are you familiar with the implementation principle of Spring, Mybatis and other frameworks?

2. Have you ever been exposed to message-oriented middleware, load balancing, RPC framework and other technologies? Have you ever done MySQL sub-library sub-table?

3, distributed architecture design, Redis distributed lock?

Does it look difficult or different from the questions in the “bank” you prepared? Don’t know where to start? If you feel this way, then you need to work on your skills.

Faced with so many technical interviews, how to say that their skills have passed?

Only the question does not have the reference answer, but, please allow me to say however, for the following questions, I still have a reference study notes document and the face of the analysis of the questions in the end of the article to share, you need to come down to learn one by one!

1. Opening Remarks

Self-introduction and project experience (introduce the project or platform with technical highlights that I am most satisfied with, and focus on the technical details of the part I am responsible for; This section mainly tests whether the candidate has a clear description of the work he has done, judging the complexity of the work)

2, the JVM

How many types of garbage collection algorithms are there? What are their corresponding strengths and weaknesses?

What is the loading process for a class? Briefly describe each step

What kinds of class loaders are predefined by the JVM? What do they do?

What is the parental delegation pattern? What does it do?

What is a memory overflow, a memory leak? What’s the difference between them?

What are the behaviors that cause class loading operations?

Introduce common tools provided by the JVM

What is the difference between Full, Major, and Minor GC?

When is the Full GC triggered?

.

\

3. Java concurrency

What are reentrant locks, optimistic locks, pessimistic locks, fair locks, unfair locks, exclusive locks, shared locks?

How does ThreadLocal work?

How does ThreadLocal work internally as a thread-isolation method for variables?

What is the implementation of InheritableThreadLocal?

And the implementation of the lock in the packet?

How about exclusive lock ReentrantLock?

4. Java collections

What’s the difference between HashSet and TreeSet?

What is the underlying implementation of HashSet?

How does LinkedHashMap work?

Why do collection classes not implement Cloneable and Serializable interfaces?

What is an Iterator?

What is the difference between Iterator and ListIterator?

5. Spring Buckets

Can the life cycle of Spring beans be answered in conjunction with the source code, or in conjunction with the meaning of the life of beans, why does Spring need to find a life cycle

What common components (at least five) are included in the Spring container, what their roles are, and what their scenarios are; Such as BeanDefinition; Another example BeanDefinitionMap

How does Spring auto injection work? Can you explain this problem from the source code; What we call automatic injection, how does it work? What’s the pit? How do you get a property not automatically injected

How does Spring source code handle loop dependencies? Does Spring support circular dependencies? Health condition not supported? What is the principle of support? Can you explain it from the source code?

How to extend Spring twice, for example by customizing an annotation that implements automatic injection; How can you develop an @xxx yourself to accomplish automatic injection without using @Autowried?

Which extensions of Spirng are used in mybatis source code? What are the problems that mybatis cannot solve after extending Spring? For example, how to solve the second level cache

How to extend Spring in eureka source code? For example, how to plug and unplug eureka functions dynamically, which technical points take advantage of Spring, or from source code

6, Redis

What are the Redis persistence mechanisms? What’s the difference? What are the pros and cons?

Data types supported by Redis

Why does Redis need to put all data in memory?

Is Redis single threaded?

What are the cache invalidation policies of Redis?

What is cache hit ratio? What are some ways to improve cache hit ratio?

Redis global command and database management

Redis designs order application scenarios

What about Redis cache avalanche?

What is cache penetration?

Order of loading AOF and RDB when Redis restarts

7. The middleware

Dubbo complete a call link introduction;

How many load balancing strategies does Dubbo support?

How does the Dubbo Provider service Provider control the maximum number of concurrent requests to be executed?

How many configurations does Dubbo support when starting up?

How many messaging middleware products do you know? The advantages and disadvantages of each product;

How does messaging middleware ensure message consistency and retry mechanism?

Spring Cloud circuit breaker mechanism;

In contrast to Dubbo, when should Spring Cloud be used? Article reprinted: Le Byte

8. Distributed

How does messaging middleware solve message loss

Dubbo service request failed

Does the reconnection mechanism cause errors

Understanding of distributed transactions

How to achieve load balancing and what algorithms can be used to achieve it?

What is the purpose of Zookeeper and how does election work?

Vertical split of data Horizontal split.

Zookeeper principles and application scenarios

They watch mechanism

How can I handle the redis/ ZK node failure

How to achieve unique sequence number in distributed cluster

How to make a distributed lock

What MQ has been used, how has it been used, how does it compare to other MQS, and is the connection to MQ thread-safe

How is the data of the MQ system guaranteed against loss

List all the strategies you can think of for separating databases from tables; How to solve the problem of query of whole table after dividing database and table.

9. Database

MySQL InnoDB storage file structure

How is the index tree maintained?

Possible problem with database auto-increment primary key

MySQL optimization

Why use B+ tree for mysql index

Database lock table related processing

Index Failure Scenario

How to safely modify the same row under high concurrency? What are optimistic locks and pessimistic locks? What are INNODB row-level locks

Mysql > database deadlocks

The last

In fact, step by step, not only by brushing questions before the interview so simple, more or usual accumulation. This article is a compilation of the core knowledge of the path to Java Advanced Architect. It is also a must-ask knowledge for the interview. These include basics, Java collections, JVMS, multi-threaded concurrency, Spring principles, microservices, Netty and RPC, Kafka, diaries, design patterns, Java algorithms, databases, Zookeeper, distributed caching, data structures, and more

\

If you need access to this document, comment on the article

I’ve packed up these tutorials for you, hoping they’ll help you while you’re learning