2020 is the toughest season for job interviews. Many big companies, such as Tencent and Bybyte, have significantly reduced their recruitment quota, but the interview threshold is constantly high. If you don’t prepare hard, you are likely to be dumbstruck by the interviewer. Today I’m going to share with you a study note for Java engineers that a senior Java architect has spent several months compiling. I hope you will get an idea of some of the questions that are often asked in interviews with large companies, and some of the real interview questions that you may share with you.

Warning! Warning! Major warning! All the materials and documents have been integrated, if you need them, you can click the link below to get the Java learning exchange, interview questions, videos, and PDF documents

The resource pack focuses on Java technology, Kafka, Mysql, Tomcat, Docker, Spring, MyBatis, Nginx, Netty, Dubbo, Redis, Netty, Spring Cloud, JavaWeb, Github, Git, Servlet, JPA, distributed, high concurrency, performance tuning, microservices, collections, multi-threading, big data, algorithms, interview questions and other related content, illustrated, with source code, but also send a wave of e-books. Contents include but are not limited to:

  • The message queue

  • Search engine

  • Redis cache

  • Depots table

  • Reading and writing separation

  • Distributed system

  • Highly available architecture

  • SpringCloud microservices architecture

The message queue

  • Why message queues? What are the advantages and disadvantages of message queues? What are the advantages and disadvantages of Kafka, ActiveMQ, RabbitMQ, and RocketMQ?

  • How can message queues be highly available?

  • How to ensure that messages are not re-consumed? In other words, how can message consumption be idempotent?

  • How to ensure the reliable transmission of messages? In other words, how do you handle message loss?

  • How do I ensure that messages are sequential?

  • How to solve message queue delay and expiration problem? What happens when the message queue is full? There are millions of messages waiting for hours. How do you fix them?

  • If you were to write a message queue, how would you architecture it? Tell me what you think.

Search engine

  • The distributed architecture principle of ES, can you say something about it?

  • How does ES write data? How does es query data work? Why don’t you introduce lucene at the bottom? Inverted index, okay?

  • Es in the case of a large amount of data (billions of levels) how to improve query efficiency ah?

  • What is the deployment architecture of the ES production cluster? How much data does each index contain? Approximately how many shards are there per index?

Redis cache

  • How is the cache used in a project? Why cache? What are the consequences of improper cache use?

  • What’s the difference between Redis and memcached? What is the threading model of Redis? Why can Redis single thread support high concurrency?

  • What data types do Redis have? In which scenarios are they appropriate?

  • What are redis expiration policies? What are the memory flushing mechanisms? Write the LRU code implementation by hand?

  • How to ensure high concurrency and availability of Redis? Can you introduce the master slave replication principle of Redis? Can you explain the Sentry principle of Redis?

  • How can Redis be persisted? What are the pros and cons of different persistence mechanisms? How is persistence implemented at the bottom?

  • Can you explain how redis cluster mode works? How is redis key addressed in clustered mode? What are the algorithms for distributed addressing? Do you know consistent hash algorithms?

  • What is redis avalanche, penetration and breakdown? What happens when Redis crashes? How does the system deal with this? How to deal with redis penetration?

  • How to ensure the consistency of cache and database double-write?

  • What are redis’ concurrency competition issues? How to solve this problem? Do you know the CAS scheme for Redis transactions?

  • How is Redis deployed in production?

Depots table

  • Why separate tables and databases (how to design the database level when designing a high concurrency system)? Which sub-database sub-table middleware have you used? What are the advantages and disadvantages of different sub-database and sub-table middleware? How exactly do you split the database vertically or horizontally?

  • Now there is a system that is not divided into database and table, and the future will be divided into database and table. How to design the system to dynamically switch from database and table to database and table?

  • How to design a scheme for dynamically expanding and shrinking the database and table?

  • How to deal with the id primary key after the database is divided into tables?

Reading and writing separation

  • Have you done MySQL read-write separation? How to implement MySQL read-write separation? How does MySQL master slave replication work? How to solve the delay of MySQL primary/secondary synchronization?

  • How to design a high concurrency system?

Distributed system

  • How does Dubbo work? Can I continue communication when the registry is down? Describe the flow of an RPC request.

  • What communication protocols does Dubbo support? What serialization protocols are supported? What about Hessian’s data structure? Does PB know? Why is PB the most efficient?

  • What are dubbo load balancing policies and cluster fault tolerance policies? What about dynamic proxy policies?

  • What is Dubbo’s SPI idea?

  • How to dubbo service governance, service degradation, failed retry, and timeout retry?

  • How is the distributed service interface idempotent (for example, no repeated deductions)?

  • How can sequential requests for distributed service interfaces be guaranteed?

  • How to design a RPC framework like Dubbo?

  • What are the application scenarios of ZooKeeper?

  • What are the general ways to implement distributed locks? How to design distributed locks using Redis? Is it possible to design distributed locks using ZK? Which of the two distributed locks is more efficient?

  • Distributed transactions? How do you solve distributed transaction problems?

  • How to implement distributed session in cluster deployment?

Highly available architecture

  • Hystrix is introduced.

  • Resource isolation based on Hystrix thread pool technology

  • Resource isolation based on Hystrix semaphore mechanism

  • Hystrix isolation policy fine-grained control

  • Get into the Hystrix execution internals

  • Optimization of batch commodity data query interface based on Request cache technology

  • Fallback degradation mechanism based on local cache

  • Deep dive into Hystrix circuit breaker implementation principles.

  • Deep Hystrix thread pool isolation and interface flow limiting

  • The timeout mechanism provides security protection for service interface invocation timeout

  • How to limit the current? What do you do at work? What’s the implementation?

  • How to do technology selection? Sentinel or Hystrix?

SpringCloud microservices architecture

  • What is Spring Cloud?

  • What are the advantages of using Spring Cloud?

  • What do I mean by service registration and discovery? How is Spring Cloud implemented?

  • What does load balancing mean?

  • What is Hystrix? How does it achieve fault tolerance?

  • What is Hystrix circuit breaker? Do we need it?

  • What is Netflix Feign? What are its advantages?

  • What is Spring Cloud Bus? Do we need it?

conclusion

The entire Java engineer study notes are arranged according to the latest first-line Internet exam, suitable for you to prepare for the interview. Due to the word limit of the article, all the notes can only be analyzed by screenshots. If you need them, you can click the links to Java learning exchange, interview questions, videos, and PDF documents to get the complete notes.