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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5f403-4453f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5f403-4453f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?