ruby - How can I place my email processes/routine outside of my frontend server (Rails 3.2/devise/sendgrid/heroku) -
in order free frontend server, i'd place requests sent sendgrid ( authentificaiton, confirmation, passwiord reset , transactionnal emaisl such "no visit long time" email , daily email send.
it's necessary plan need keep memory , power of main server web app , includes displaying pages possible. we'd keep emails routines eating of our main web app server memory/power.
now on 1 single server (on dyno on heroku) (plus database).
as plan have lot of traffic on front end, think make sense create dyno reserved email process (let's call "email server/dyno".
but should talk app , database
for ex if user signs up, main dyno web app has send message "email server"
another ex: i'll have access same database use cron see if need send email if user subscribed 8 weeks ago , and has never signed in on website.
so keep short,
how can create set server deal emails
should put same gems , environment
how can "email server" talk main web app , database?
any advice or resource on web explains how this?
the way own apps resque , resque mailer. resque queue based on redis can run using heroku worker. here resources might started that:
- https://github.com/resque/resque
- http://www.slideshare.net/homanj/background-jobs-with-resque
- http://blog.leshill.org/blog/2011/04/03/using-resque-and-resque-scheduler-on-heroku.html
resque mailer plugin lets background emails actionmailer using resque. can find more details on github readme:
Comments
Post a Comment