Scenario A: When A user logs in, an SMS message is sent to the user’s mobile phone, prompting that the user has logged in. Check whether the user has logged in or the password is leaked.

Scenario B: When the user logs in, 10 points are awarded and the display of points is refreshed;

Scenario C: When users log in, the Marketing Department wants to collect the login time of these users.

Scenario: D…

Scenario: E…

1. Decoupling; For example, when a user logs in, the SMS service needs to be invoked. After a period of time, when the user logs in, the increment needs to call the integral service; After a period of time, when the user logs in, the log service needs to be called.

2. Peak traffic clipping will bring great pressure to the database in the case of high concurrency, and the concurrent visits will exceed the carrying capacity of the original system, which will aggravate the response delay of the system.

3. Log collection Takes advantage of the high performance of message queue products in receiving and persisting messages, and introduces message queues to receive log messages quickly to avoid access blocking and request delay caused by some faults in writing logs.

4. Final consistency of transactions (1) Same transaction (2) Distributed transaction (3) Message queue processing (simply speaking, a message to add money to Yu ‘ebao account is sent to the message queue when money is deducted from Alipay account)