About using PHP to make a dividend plan in the early hours of every day.

1. Number of users: about 5w
2. Business requirements:

5

3. Problems encountered:

mysql
redis
Mar.29,2021

it is recommended to make an asynchronous queue. When a condition is triggered, the data is lost to the connection, and then the calculation is carried out. It is not necessary to wait until the early morning to calculate the dividend plan. On my side, when the user recharges, it is written to the queue and calculated asynchronously. I use beanstalked queues to support data persistence


I think you use asynchronous queues to calculate dividends, and then use scheduled tasks to pay dividends at the time you specify.

Menu