Xiaobian after more than a month of efforts, to give you a summary of the interview topic. This interview question involves high concurrency, distributed, high availability related knowledge points, here to share with you, I hope you can get an ideal Offer! Because it’s a written test, you can do it first. If you need to see the answer, you can join my QQ technical discussion group to see the answer. I have uploaded the answer file to QQ group. QQ group number: 850276684. Or click the link below to join the group directly: Click join the group

High concurrency 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? (How to ensure idempotency when consuming messages)
  • How to ensure the reliable transmission of messages? (How to 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?

The cache

  • How is the cache used in a project? What happens if the cache is not used properly?
  • What’s the difference between Redis and Memcached? What is the threading model of Redis? Why is single-threaded Redis so much more efficient than multi-threaded Memcached?
  • What data types do Redis have? In which scenarios are they appropriate?
  • What are Redis expiration policies? 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 introduce Redis’ sentry principle?
  • 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? How do I dynamically add and remove a node?
  • What is Redis avalanche and penetration? What happens when Redis crashes? How does the system deal with this? How to handle 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

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

High concurrency system

  • How to design a high concurrency system?

Distributed system

Resolution of the system

  • Why system split? How to split the system? Can we split it without Dubbo?

Distributed Service Framework

  • How does Dubbo work? Can I continue communication when the registry is down?
  • What serialization protocols does Dubbo support? 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?

A distributed lock

  • What are the application scenarios of Zookeeper?
  • How to design distributed locks using Redis? Is it possible to use Zookeeper to design distributed locks? Which of the above two distributed lock implementation methods is more efficient?

Distributed transaction

  • Distributed transactions? How do you solve the distributed transaction problem? TCC: What if the network is disconnected? How is XA consistency guaranteed?

Distributed session

  • How to implement distributed Session in cluster deployment?

Highly available architecture

  • Hystrix introduction
  • E-commerce site details page system architecture

High availability system

  • How to design a high availability system?

Current limiting

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

fusing

  • How to fuse?
  • What are the fuse frames? Do you know the specific implementation principle?

demotion

  • How to downgrade?

Also welcome to follow my wechat public number to discuss together.