Benchmarking Transactional Email APIs - Who’s Fastest?
Businesses rely on transactional emails for everything from order confirmations to one-time passwords. They plan an important role in many workflows. And for customers, there are few things as frustrating as not being able to create an account or reset your password because you haven’t received an email yet. Both sides expect speed and reliability. So, we set out to determine which email delivery platform was fastest.
In this post, we’ll show you how we used Multiple’s load testing platform to evaluate email delivery times and API response times for five popular email delivery platforms: Amazon SES, MailChimp, Mailgun, Postmark, and Twilio SendGrid. Most importantly, we’ll crown a champion.
Testing Methodology
To determine who has the fastest transactional email API, first we had to determine the metrics that each provider would be evaluated on. We decided on email delivery time and API response time.
- Email delivery time: The number of milliseconds from API call to receiving an email.
- API response time: The number of milliseconds from API call to response.
Initially, we tried measuring email delivery time using IMAP. However, we encountered two issues: timestamps only had second-resolution, and the server’s clock was out of sync with UTC by several seconds. Both impacted the accuracy of the test, so we created an SMTP server that inserted the email subject and timestamp into a Redis database whenever a message was received. Each email had a unique email so that we could track it.
For each provider, we emulated 20 virtual users (VUs) concurrently making API calls for two minutes. All tests were run on Multiple’s load test platform at approximately the same time from the same location to reduce variance.
Example Code
NPM Dependencies
Require Statements
Environment Variables
VU Init
VU Loop
VU Cleanup
Performance
Before we reveal the final results, let’s take a look at performance. The graph below is from our test of Twilio SendGrid.
Let’s walk through the results. There are a few things you’ll want to keep an eye on.
- Email delivery time: It's important to determine if the email delivery time is acceptable for your use case. While longer delivery times might be acceptable for marketing content, they are less so for one-time passwords.
- API response time: The graph suggests that the Send Email API has response times around 5,000 ms. As a result, it makes sense to call this API asynchronously, potentially using a queue pattern.
- Consistency: The graph shows a nearly flat line for API response times, indicating consistent performance. This is a good sign, you don’t want an unpredictable service. However, it's important to mention that the duration of this test was only two minutes. Performance may vary at different times of the day.
Results
Now it’s time to answer the question: who’s got the fastest transactional email API?
Email Delivery Time Rankings
- Mailchimp (570 ms)
- Amazon SES (737 ms)
- Postmark (1,118 ms)
- Twilio SendGrid (1,404 ms)
- Mailgun (2,697 ms)
API Response Time Rankings
- Twilio SendGrid (5,091 ms)
- Mailgun (5,118 ms)
- Amazon SES (5,218 ms)
- Postmark (5,263 ms)
- Mailchimp (5,331 ms)
Parting Thoughts
Based on our tests, Mailchimp had the fastest email delivery time with AWS SES not far behind. The slowest performance was measured for Mailgun, with email delivery times roughly 4.5x slower than Mailchimp. API response times were all pretty close with Twilio SendGrid beating out Mailgun by 27ms.
However, speed shouldn’t be the only consideration when choosing an email provider. Support, reliability, features, and pricing should all factor into your decision. We hope that this benchmark study helps you to make an informed decision when choosing an email delivery platform. Try it out yourself with the samples in this post – we’re curious to see your results.
Is there another service or category you want us to benchmark? Let us know: hello@multiple.dev.