简体   繁体   English

滑轨。 以每秒配额发送邮件(amazon ses)

[英]Rails. Mailing with per second quota (amazon ses)

I have 'Maximum send rate' quota on Amazon-SES service, which means the maximum number of emails that I can send per second. 我在Amazon-SES服务上具有“最大发送速率”配额,这表示我每秒可以发送的最大电子邮件数量。 What is the best way to organize my mailing in Ruby on Rails considering this quota? 考虑到此配额,在Ruby on Rails中组织邮件的最佳方法是什么?

Well, queue them and schedule a batch process to consume from this queue and send them in a timely way, considering the quota. 好吧,将它们排入队列并安排一个批处理过程以从该队列中使用,并在考虑配额的情况下及时发送它们。 I haven't worked with queues in RoR but I believe there are some solutions out there. 我尚未在RoR中处理队列,但我相信这里有一些解决方案。 Worst case scenario, queue them on the database. 最坏的情况是,将它们放在数据库中排队。 One point you should consider is the batch is not fast enough to fullfil all the mailing requestes he receives. 您应该考虑的一点是,批处理速度不够快,无法满足他收到的所有邮件请求。 You might them notify the admin, drop or persist the mailing for further attempt. 您可能会通知管理员,删除或保留邮件以进行进一步尝试。 If notified you can buy more throughput from Amazon or something like that. 如果收到通知,您可以从亚马逊或类似公司购买更多的吞吐量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM