如何实现邮件系统与Rails在后台发送电子邮件 [英] How to implement a mailing system with Rails that sends emails in the background
问题描述
-
写在数据库中的一个表中有一个
后台进程,
发送电子邮件(关注:潜在的许多
读/写DB减慢我的
应用程序) -
消息队列
后台进程/耙任务
(担心:如果服务器崩溃排队
邮件将丢失也可能会吃掉
a许多电子邮件的内存)
我想知道您是否知道一个良好的解决方案,可以提供可靠性和性能之间的平衡。
我认为Starling and Workling将能够帮助你=)看这个轨道: http://railscasts.com/episodes/128-starling-and-workling
I want to implement a reliable mailing system with Ruby on Rails that sends emails in the background as sending email sometimes takes like 10 seconds or more so I don't want the user to wait. Some ideas I thought of:
Write to a table in DB a have a background process that go over and send email (concern: potential many reads/writes to DB slows down my application)
Messaging Queue background process / Rake task (concern: if server crashes queued mails will be lost also might eat up a lot of memory if many emails)
I was wondering if you a know of a good solution that provides a balance between reliability and performance.
I think Starling and Workling will be able to assist you =) Watch this railscast: http://railscasts.com/episodes/128-starling-and-workling
这篇关于如何实现邮件系统与Rails在后台发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!