What if it is sent in groups aimed at hundreds of thousands of users? Such as discount email, SMS notification, coupons for all staff.

for example, in order to do the Singles Day event, you need to send an event email to all users and give coupons to all users. For this function, I want to realize that when the administrator sends email, check the mail template and select all members, so you can actually send it in groups. There is no need to notify technicians to do other additional operations, add planning tasks, and give away coupons. Just select the coupon template and select all members. Click give away, and there is no need to notify the technician to do other additional operations. Similar to this kind of all-staff gift or mass distribution function will also be added, how to design, and ensure its scalability.

Aug.14,2021

prepare the queue center, such as redis's List queue, or use applications such as MessageQueue. When the demand occurs, the production message is sent to the queue.

prepare the consumption center, such as using crontab to trigger php-cli, to receive message center data constantly, and then do the corresponding operation according to the message content.

production, queue and consumption are all low coupling, and there is no doubt about scalability.

Aliyun's MQ function or self-built RabbitMQ, is a good choice.

Menu