Tuesday 23 October 2018

How We Built an Email Queue that Can Send 100 Emails Per Second Through Amazon SES


It’s no secret that I’ve been plugging away at WP Offload SES, a new plugin that we’re hoping to launch soon that will make it easier to send your site emails over Amazon SES. While I’ve mentioned it before on this blog, one thing that I haven’t mentioned is the performance you can expect to get out of it. In this week’s article I decided to step back for a second and review the queueing system we put in place, and how we managed to squeeze every last ounce of performance out of it.
Planning Things Out
Right off the bat we knew that we needed to implement an email queue, so that instead of sending emails right away they are queued up and processed in batches. SMTP servers will usually have a built-in queue, but since we’re using the Amazon SES API instead of SMTP, we need to roll out our own solution.
Without a queue we’d run into situations where the site is trying to send out hundreds, if not thousands of emails at once, and this would inevitably lead to a crash due to a lack of memory or time to process the request. There’s also the Amazon SES rate limit to consider, which isn’t set in stone and varies from account to account.
Source: https://managewp.org/articles/18006/how-we-built-an-email-queue-that-can-send-100-emails-per-second-through-amazon-ses



source https://williechiu40.wordpress.com/2018/10/23/how-we-built-an-email-queue-that-can-send-100-emails-per-second-through-amazon-ses/

No comments:

Post a Comment