Ant interview

Phone side

  • Introduce yourself, why you are studying for graduate school, etc

  • JVM memory structure, garbage collection.

  • Java concurrency

    • What are the
      reference answers for Java locks : fair lock/unfair lock; whether it is reentrant; exclusive lock/shared lock, read-write lock ReentrantReadWriteLock can be regarded as a combination of exclusive lock and shared lock; pessimistic lock/optimistic lock (CAS)
    • The difference between synchronized and lock
  • Architecture and optimization

    • General idea
    • The difference between mysql master-slave and master-slave. The main storage engine of mysql and its differences. Affairs.
    • Distributed locks
      I mentioned that redis and zookeeper can be used to implement distributed locks, but he also asked how to implement it with a database. You can refer to distributed locks based on database.
    • Database and cache consistency

Two sides of the phone

  • Self-introduction etc.
  • Core parameters of thread pool
  • Lock upgrade, lightweight lock. How does CAS solve the ABA problem. volatile.
  • JVM heap area structure. How to tune. The advantages of G1. How to troubleshoot online OOM issues. How to troubleshoot if CPU load is too high? What is your first impression? Answer: code problems such as infinite loop. Q: Is GC possible? 1
  • Some key knowledge points of NIO 2 , 3 , 4
    :
    BIO data read and write must be blocked in a thread waiting for its completion.
    IO multiplexing: one thread can handle multiple network connections.
    Selector: no longer polling channels, but polling events. Based on event-driven mechanism. epoll.
    Direct memory can be manipulated in NIO, which is also a reason for its better performance than BIO.
    In 5 , an IO operation is divided into two steps: initiating an IO request and the actual IO operation to distinguish whether it is blocked, and synchronous/asynchronous. I think it seems to help understanding.
  • Netty 6
  • Sub-library and sub-table
  • Distributed transactions. TCC
  • Primary key index
  • Are you familiar with big data products? For example, stream computing, like Spark, Flink.
  • zookeeper electoral process 7 . Implement distributed lock with zk
  • Kafka throughput is relatively high. Message sequence.
  • Spike

Some related links:

Ant Financial Interview Experience Sharing, Ali’s offer is really not difficult
. An interview experience of Ant Financial (one side, two sides).
Ant Financial’s recruitment written test-implement a transfer interface according to needs


  1. Remember to solve the problem of high CPU caused by crazy gc of jvm ↩︎

  2. Summary of BIO, NIO, AIO of JavaGuide.md ↩︎

  3. "3.3.3 NIO Network Programming" ↩︎

  4. The best epoll explanation I've ever read-transferred from "Knowledge" ↩︎

  5. Explanation about JAVA NIO is synchronous non-blocking I/ O↩︎

  6. Please! Please don't ask me about the underlying architecture principles of Netty again during the interview! ↩︎

  7. Leader election of Zookeeper↩︎

Guess you like

Origin blog.csdn.net/qq_23204557/article/details/115052062
ANT
ANT