2

I have an application that emails individuals on different occurrences. The entire application is on a single server. I am currently sending emails through SendGrid. At what volume of emails would it make sense to use a system like RabbitMQ to send out emails?

Maximum rate = 1 email per minute? 1 email per second? 10 emails per second? How would I evaluate when the switch makes sense?

3 Answers 3

5

Why are you considering RabbitMQ ? it is better to consider using a MTA/Mail relay like Postfix where you submit your emails and it handles them for you in a queue.

You can configure it to dispatch the queue on different mail relays, set the email throughput, how much retry shall be made on a failed sending ...

1

Having Rabbitmq is good option when your are considering scaling in future, I mean in terms of new smpt send mail workers or new email server, as of now if you have single server and not going to more in it then rabbitmq will load your server even more and will be issue to maintain, but if your going to have more then 100 mails per second then it makes sense to have rabbitmq its goal to make your calling function free as soon as possible by offloading all the load from function to rabbitmq queue and then save it till worker or consumer doesn't pick them, this will help in fail cases too as your having your mails saved in rabbitmq and if the consumer fails you still have your mails, when it starts (smtp send worker) then rabbitmq will provide the rest of the mails to it. I hope this makes sense, please feel free to ask other stuff about it, I used rabbitmq for sending mail but in my case we are having one server running only rabbitmq only so there it makes sense.

0

It is normally a good idea to look at Postfix or another email server but if you're sending out email to customer on email servers you don't manage (Gmail, Rackspace, MS Live, another company), you might want to look at something that offloads that entirely. I've had luck using SendGrid. They handle a lot of that email related junk for you and they are pretty cheap. Definitely worth the money, outbound SMTP servers are a pain.

EDIT:

It occurred to me that it might not be clear why it would be good to use a service like this if you have external delivery of email. SendGrid (and its ilk) spend a lot of time studying deliverability and they will help make sure your email doesn't end up in the SPAM folder.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.