Interface idempotence scheme

1. Database primary key or unique index.

2. Optimistic locking of the database.

3. Database field status.

4. Database anti-weight table (flow table).

5. Redis token, first obtain the unique key, and then request the business system to find and delete the key.

6. The unique serial number of the downstream service, save a valid key in redis when requesting, if it exists, it means it has been executed.

7. Distributed locks.

8. Globally unique number. source (source) + seq (serial number), this method is used by multiple three-party systems.

 

detailed:

https://mp.weixin.qq.com/s/7AZDaF4m8yGe19yNb_V7cA

https://www.cnblogs.com/linjiqin/p/9678022.html

Guess you like

Origin blog.csdn.net/Anenan/article/details/114257138