Ant Financial's 2020 financial core department experience (Redis + AOP + middleware + distributed lock, etc.)

One side (personally feel that the answer is pretty good)

1. Introduction

2. Speaking of the project, the project asks very deeply (I mentioned a project about FULL GC problem positioning and optimization and a multi-concurrent project I did before)

2.1 Are you clear about the system positioning of the projects you have produced?

2.2 Are you clear about the various modules of the system?

2.3 The tps of each interface?

2.4 Dependence on upstream and downstream systems?

2.5 Are you clear about the middleware and framework used?

3. What do you think is the brightest thing in your project?

4. What are the differences, advantages and disadvantages of memcache redis among the same kind? What are the points of attention?

The only data type that memcache can store is string type, while redis can store data of character, list, sorted list, and hash data types;

Memcache does not support data persistence, redis supports RDB and AOF persistence;

memcache does not support clusters, redis supports redis-cluster clusters

5. Talk about redis distributed lock

I mentioned the setnx() method of redis and the KV structure of redis. The lock is used as the key. The value corresponding to the key uses the map structure. The requestId is used in the map as the key of the map. The expiration time is used as the value of the map. Algorithm, compare whether the time has expired to acquire and release the lock

6. TCP,UDP

7. Have you ever tested the concurrency of multiple concurrent projects? QPS, the requested message volume is too large, will using the task queue created by yourself cause the memory to burst?

8. Redis cluster master-slave data synchronization

The master-slave cluster realizes the separation of data read and write, the master server is responsible for reading and writing, partial rewriting, and the slave server is only responsible for reading. After the master server is started, the log file is sent to the slave server, and the slave server updates the data according to the log file. After that, if the master server has a write operation, it will also send the corresponding write operation to the slave server.

9. How Zookeeper implements election

During the election of zk, the state of all nodes at the beginning is looking. When a node’s votes exceed half of all nodes, the node will become the leader, the node status is leading, and other nodes will become followers. , The node status is following. The election is based on (sid, zxid) data, sid represents the ID of the node, and zxid represents the transaction ID. During the first round of the election, each node will elect itself as the leader and send (sid, zxid) to other nodes. Point, the data received by other nodes (sid, zxid) is compared with its own data, if the zxid is larger than its own zxid, then the current node is directly elected; if it is less, insist on electing yourself; if the zxid is equal, compare the sid The big one is the leader.

10. Talk about distributed (I’m talking about Dubbo)

11. How to realize database transaction and distributed data consistency?

Readers can understand the ZAB agreement, I probably said around the ZAB agreement

12. SpringIOC,SpringAOP

I briefly talked about the principles of IOC, AOP, and the modes that the principles depend on

13. Isolation level of database transactions

Four major isolation sectors: Uncommitted-read Commited-read Repeated-read Serializable respectively for database dirty reads, non-repeatable reads, and virtual reads

14. Talk about RPC

RPC remote call, talk about the principle, the components used, and the main tasks of RPC: serialization, data transmission, method invocation (the ID corresponding to the method)

15. Algorithmic questions : written test questions-shortest path problem (this question is passed)

As shown in the figure, a logistics dispatcher p needs to deliver packages to 4 express points a, b, c, and d. What route does the dispatcher need to choose to complete the shortest delivery. Assuming the starting point coordinates (0,0) of the dispatcher as shown in the figure, the dispatch route can only travel along the sides of the squares in the picture. Each small square is a square with a side length of 1. For example, the distance from p to d is 4 . Randomly input n delivery point coordinates, and find the shortest delivery route value (the distance from the starting point to complete the delivery of n points and return to the starting point).

My approach is to use a permutation algorithm to arrange all the situations and calculate the shortest path

Two sides (personally feel that the answer is particularly rubbish, six questions answered two)

1. Introduction

2. Difficulties in the project, from all angles

3. FULL GC troubleshooting tool

I actually didn’t use any tools when I was doing the project, I just used the Linux command TOP, TOP interactive command 1, H; jsatck, jstat and JVM related parameters and JVM log viewing

4. The most difficult problems encountered in development

5. Spring transaction, nested transaction

I was actually confused about this question. I answered quite badly. I kept answering the issue of transaction isolation. After the interview, I summarized some knowledge about Spring transactions.

6. What are the benefits of interface-oriented programming

The question asked is too abstract, I can’t answer well, the interviewer said it’s not perfect

7. Two inserts in the database operate on the same table at the same time. The first thread operates half of the operation. What will happen to the second thread?

My answer was sloppy, and I checked it down. It probably means that the lock involved here is an intermittent lock. Readers can look at the relevant knowledge.

8. Talk about deadlock

For example, there are two threads 1 and 2, two locks a and b. Thread 1 applies for lock b after acquiring lock a, while thread 2 has already acquired lock b and needs to apply for lock a. Between the two threads Deadlock

to sum up

After the technical side, there is HR, so I won't say more about this. In the overall interview experience of Ant Financial, the interviewer is very professional and requires familiarity with the basic knowledge. You must prepare before the interview and then go to the interview. LeetCode topics should also be brushed.

Remember to brush up the questions and prepare before the interview. Do not write on the items on your resume if you are not familiar with it. Prepare 2-3 technical solutions for the items on the resume.

At last

The codeword is not easy, if you think it is helpful, you can help forward it so that more people in need can see it

It's another year of job hunting season. Here, I have prepared a set of high-frequency interview written test questions for Java programmers to help you win the BAT offer. The topics range from basic Java basics to advanced distributed architecture. Wait for a series of interview questions and answers for your reference. If you need it, you can [forward + follow] backstage private message me [data] to get it for free, the following are some screenshots of the data

Remember [forward + forward + forward]! ! !

 

 

 

Due to space reasons, I will not show them one by one. If you need trouble, like and pay attention, add assistant VX: mxx2020666, free to receive

Guess you like

Origin blog.csdn.net/m0_46995061/article/details/109405182