John
John

Reputation: 3546

Amazon SES Smtp much slower than Raw mails

Why is Amazon Simple Emailing Service Smtp mails 10 times slower than raw mails ?

The only difference is the raw mails are sent with the methods provided with the AWS SDK. The SMTP emails were sent using the the built in C# code to send emails (System.Net.Mail.SmtpClient) which then points to the aws smtp end point.

This happens in a background service but the smtp is 10 times slower. Currently sending at a rate of something like 1 per second while our current quota should be 14 per second.

Upvotes: 1

Views: 900

Answers (1)

AnFi
AnFi

Reputation: 10913

Could you Check TCP/IP Round Trip Time between your server and "the aws smtp end point"?
Use ping or traceroute to measure it

Sending email over SMTP without pipelining requires at least

  • 3 RTT in case of reused SMTP connection (MAIL FROM:+RCPT TO+DATA).
  • 7 RTT in case of one mail per one SMTP connection (+1 RTT for SMTP AUTH)

Possible fixes:

  • reuse SMTP connection (many messages over single SMTP connection)
  • use pipeling (sending commands before receiving pending replies
    but email-smtp.us-east-1.amazonaws.com does not advertise pipeling support in ehlo reply
  • use a few parallel SMTP connections

Upvotes: 1

Related Questions