MySQL-based customized delay time
Last updated
Was this helpful?
Last updated
Was this helpful?
Easy to support customized delay time
It will be hard to support large concurrent number of requests.
For example, if the delay latency is within 0.5s, then the round robin rate should be bigger than twice per second. And if there are thousands of tasks to dispatch to message queue, it wouldn't be able to finish sending the traffic.
Creates a table within a database, uses a timer thread to scan the table periodically.
Partition by week, month, date
Choose the sharding key:
Business topic: If delay topics have different frequency, then data will not spread evenly across shards. If messages delivering to the same business topic will be delivered on the same delay topic, then message ordering could be preserved.
Round robin could help reduce uneven distribution.