SlideShare une entreprise Scribd logo
1  sur  24
Email
                                 Architecture
                                    using
                                 Amazon SES

                                            1
Deliverability and Scalability
Introduction
• Email is a method of exchanging
  digital messages from an author to
  one or more recipients

• Email is one of the most critical
  component in an application for
  communication between the
  application and its users

• Sending effective emails help
  business to bring in more people to
  use their sites and to share
  information that helps the end
  users                                 2
How Email is sent?
• Internet was built on
  trust and email also
  works in the same
  fashion

• No authentication
  exists between ISP to
  send emails

• SPAM abuse is high as
  this trust is misused
                          3
What ISP’s are doing?
• ISP’s nowadays actively
  block IP ranges that
  they believe generate
  SPAM

• ISP’s employ a range of
  software to categorize
  email as JUNK, SPAM,
  Phishing, etc…

• Countries are actively
  legislating to punish
  offenders                 4
What companies are worried about?
• Email deliverability
  • Ensure email reaches
    the Inbox of the
    recipients

• Handle ISP reports
  • Complaints
  • Bounces

• Statistics

• Keep delivery costs low
                                    5
Deliverability
• Refers to the likelihood of the email reaching the intended
  destination

• Majority of global email traffic is either unsolicited or undesired
  bulk email
  • 88 to 92% of email traffic in year 2010 were spam

• Due to the security measures of ISP, even genuine emails are
  marked as SPAM causing the company’s reputation to be
  downgraded from a users perspective

• Users are nowadays extremely cautious about clicking any links in
  email that are marked as SPAM                                         6
ISP reports
• ISP’s respond to origin with reports on emails that were
  processed by the systems

  • Bounces – Messages sent to non existent email address

  • Rejections – Size limitations and attachment types

  • Complaints – Complaints about email content, etc…

• Email systems need to handle these responses and need to
  proactively handle the issue

• Ignoring reports can force an ISP to block the IP address of origin   7
  server causing email outage
Statistics
• Email Statistics are an essential component of a business
  application to understand the reach of emails

  • Successful deliveries
  • Click tracking
  • Failure reports

• The above statistics are vital to understand the success of email
  marketing and campaigns

• This data adds business benefit to ensure that the customer can
  reach your system in case of emergency
  • Unable to deliver newly generated passwords since the users email   8
    box is closed
Amazon Web Services

AMAZON SIMPLE EMAIL SERVICE (SES)   9
Amazon Simple Email Service
Features                        Benefits
• Simple Setup                  • Simple

• Zero Infrastructure           • Inexpensive
• Bulk & transactional email-
  sending service               • Reliable

• Standard SMTP service         • Scalable

• DKIM support                  • No upfront costs

• API availability              • Workflow Integration
                                                         10
About SES
What is it                        What its not
• Its an email delivery service   • Not a replacement for your
  for bulk and transactional        exchange servers. It doesn’t
  system                            receive emails

                                  • Not a marketing tool for
• Supports both SMTP and API        sending bulk messages and
  based access                      track status. You’ve to build
                                    the system on top of SES
• Offers support for setting up
  DKIM and signing messages       • Not a guaranteed email
                                    service that handles
                                    everything for you. It helps
• Offers endpoint to receive        you to build a guaranteed
  information on email delivery     delivery system.
                                                                    11
How SES helps business?
• Offers easy interface to help with complex setups like DKIM, etc..

• Offers a scalable, highly available service for sending emails

• Offers feedback loops to handle bounces and complaints

• Offers a no CAPEX model for your email delivery setup

• Automatically filters your content to prevent SPAM messages
  from being sent out if your infrastructure is compromised

• Requires no changes to existing applications since SES is            12
  compliant with SMTP protocol
DKIM Signing
• DomainKeys Identified Mail (DKIM) is a standard that allows
  senders to sign their email messages and ISPs to use those
  signatures to verify that those messages are legitimate and have
  not been modified by a third party in transit.

• DKIM signing helps in deliveryability of email messages as ISP’s
  can verify the sender’s domain for authenticity.

• DKIM Setup in SES can be done in 2 ways
  • Easy DKIM using the SES console

  • Manual DKIM signing by using the SES REST API
                                                                     13
Easy DKIM Signing
                             1
• Verify a new Domain
• Generate DKIM Settings
• Add the DNS records with
  your registrar
  • 1 TXT record             2

  • 3 CNAME records


                 3




                                 14
Error Handling
• SES offers endpoints to handle the following errors:-
  • Bounces
  • Complaints

• SES can be configured to handle errors in the following
  ways:-
  • SNS topics (HTTP endpoints)
  • Email Forwarding




                                                            15
Send Rates
• Depending on the needs of the application, SES throttles the
  maximum messages that you can send in a second

• Adherence to this rate is essential to ensure SES service
  availability

• You can request the SES team to increase the rates if your
  application needs are more

• Send rates improve based on email quality and decreases based
  on JUNK/SPAM/Bounces

                                                                  16
Amazon Simple Email Service (SES)

SCALABLE EMAIL ARCHITECTURE         17
Scalable Email Architecture




                              18
Delivery Workflow
• Application logs a queue message for sending email

• Email service polls the queue to get the message

• Locks the queue message as being processed

• Parses the message to identify the message and recipient

• Calls SES to send the email message to the recipient

• Deletes the message from queue on success
                                                                19
• Marks the message as unread if failure in SMTP connectivity
Email Service
• Independent Tier to handle Email delivery

• Can be multi threaded / multi instance for scale

• Distributed architecture for handling failures

• Has logic to handle the following
  • Log bounces to prevent resending to an non existent address
  • Control send rates based on configuration
  • Failover in case SES is down to switch to a different SMTP service

• Can be independently tested
                                                                         20
• Can offload logic to generate email messages based on a email
  event – template pattern
Bounce Handling
• SES receives the bounce message from ISP

• SES sends the message to the SNS topic configured for bounces

• SNS sends the message to the subscriptions
  • Can be an email address to manually handle the bounces
  • Can be an HTTP endpoint for an application to process the message
    immediately
  • Can be an SQS queue for distributed processing (Current Architecture)

• Email Service polls the SQS bounce queue to receive the bounces

• Takes appropriate actions based on the setup
  • Mark the email address as non functional in database
  • Maintain its own store of failed email address (Validates against this
    every time when an email needs to be sent out)
  • Sends an alert to the user’s alternate email address about the           21
    applications inability to reach the user
Load Testing your service
• The email service can be independently tested as it is not directly
  linked to the main application

• Email service capabilities like bounce handling can be tested by
  using the new SES mailbox simulator

• You can read more about the mailbox simulator here

• http://aws.amazon.com/about-aws/whats-
  new/2012/10/03/amazon-simple-email-service-announces-
  mailbox-simulator/

                                                                        22
• Using the mailbox simulator will not affect your SES reputation
SES safety measures
• SES is a cost-effective email delivery service

• Being cost-effective makes it attractive for spammers

• Bounces are unavoidable in an internet accessible application that
  allows registrations.

• SES evaluates your reputation on the following basis:-
   • Bounce Percentage
   • Complaints received
   • Quality of emails

• SES takes these parameters seriously and can block production access
  when SES service is abused
                                                                         23
• As long as the bounce percentage and the quality of emails are good,
  SES is a cost-effective service for your emailing needs
Jithendra Balakrishnan

HAPPY EMAILING                                                   24


                         All Images copyrighted to respective authors

Contenu connexe

En vedette

Email ppt
Email pptEmail ppt
Email pptmelgade
 
Building a Scalable Email Processor With AWS
Building a Scalable Email Processor With AWSBuilding a Scalable Email Processor With AWS
Building a Scalable Email Processor With AWSStephan February
 
(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...
(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...
(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...Amazon Web Services
 
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015Suzzicks
 
What You Need to Know About Google App Indexing - SMX West 2016
What You Need to Know About Google App Indexing - SMX West 2016What You Need to Know About Google App Indexing - SMX West 2016
What You Need to Know About Google App Indexing - SMX West 2016MobileMoxie
 
BDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu clienteBDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu clienteJorge Gamba
 
Conferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsConferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsDavid Calavera
 
Introducción a Ganglia
Introducción a GangliaIntroducción a Ganglia
Introducción a GangliaDardo Valdez
 
Software Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo HolísticamenteSoftware Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo HolísticamenteAngel Nuñez
 
Alta disponibilidad con MySQL
Alta disponibilidad con MySQLAlta disponibilidad con MySQL
Alta disponibilidad con MySQLDennis Cohn
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Ricard Clau
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applicationsOnline
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP applicationJavier López
 

En vedette (20)

Email ppt
Email pptEmail ppt
Email ppt
 
Building a Scalable Email Processor With AWS
Building a Scalable Email Processor With AWSBuilding a Scalable Email Processor With AWS
Building a Scalable Email Processor With AWS
 
(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...
(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...
(SDD412) Amazon Simple Email Service Deep Dive and Best Practices | AWS re:In...
 
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
 
What You Need to Know About Google App Indexing - SMX West 2016
What You Need to Know About Google App Indexing - SMX West 2016What You Need to Know About Google App Indexing - SMX West 2016
What You Need to Know About Google App Indexing - SMX West 2016
 
Domain Name System
Domain Name SystemDomain Name System
Domain Name System
 
BDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu clienteBDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu cliente
 
Conferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsConferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y Rails
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Introducción a LDAP
Introducción a LDAPIntroducción a LDAP
Introducción a LDAP
 
Introducción a Ganglia
Introducción a GangliaIntroducción a Ganglia
Introducción a Ganglia
 
Software Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo HolísticamenteSoftware Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo Holísticamente
 
Alta disponibilidad con MySQL
Alta disponibilidad con MySQLAlta disponibilidad con MySQL
Alta disponibilidad con MySQL
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2
 
OAUTH introducción y entretenida explicación.
OAUTH introducción y entretenida explicación.OAUTH introducción y entretenida explicación.
OAUTH introducción y entretenida explicación.
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
Conferencia Monitoreo de Servidores con Nagios
Conferencia Monitoreo de Servidores con NagiosConferencia Monitoreo de Servidores con Nagios
Conferencia Monitoreo de Servidores con Nagios
 
TDD with phpspec2
TDD with phpspec2TDD with phpspec2
TDD with phpspec2
 
Email
EmailEmail
Email
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
 

Plus de 8KMiles Software Services

Plus de 8KMiles Software Services (10)

Building SaaS products with Windows Azure
Building SaaS products with Windows Azure Building SaaS products with Windows Azure
Building SaaS products with Windows Azure
 
APAC Webinar Apr 10 - Architecting your Mobile App for the Cloud
APAC Webinar Apr 10 - Architecting your Mobile App for the CloudAPAC Webinar Apr 10 - Architecting your Mobile App for the Cloud
APAC Webinar Apr 10 - Architecting your Mobile App for the Cloud
 
Are you game for Cloud?
Are you game for Cloud?Are you game for Cloud?
Are you game for Cloud?
 
Preparing your IT infrastructure for thanksgiving
Preparing your IT infrastructure for thanksgivingPreparing your IT infrastructure for thanksgiving
Preparing your IT infrastructure for thanksgiving
 
8KMiles Cloud Solutions
8KMiles Cloud Solutions8KMiles Cloud Solutions
8KMiles Cloud Solutions
 
Hollywood asks "Are you ready for Cloud?"
Hollywood asks "Are you ready for Cloud?"Hollywood asks "Are you ready for Cloud?"
Hollywood asks "Are you ready for Cloud?"
 
Are you prepared for Viral Success?
Are you prepared for Viral Success?Are you prepared for Viral Success?
Are you prepared for Viral Success?
 
Avoid Embarrassment, Use Cloud
Avoid Embarrassment, Use CloudAvoid Embarrassment, Use Cloud
Avoid Embarrassment, Use Cloud
 
Monitoring on Amazon AWS Cloud
Monitoring on Amazon AWS Cloud Monitoring on Amazon AWS Cloud
Monitoring on Amazon AWS Cloud
 
8KMiles Cloud Services on AMAZON AWS
8KMiles Cloud Services on AMAZON AWS8KMiles Cloud Services on AMAZON AWS
8KMiles Cloud Services on AMAZON AWS
 

Dernier

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Dernier (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Email architecture using SES

  • 1. Email Architecture using Amazon SES 1 Deliverability and Scalability
  • 2. Introduction • Email is a method of exchanging digital messages from an author to one or more recipients • Email is one of the most critical component in an application for communication between the application and its users • Sending effective emails help business to bring in more people to use their sites and to share information that helps the end users 2
  • 3. How Email is sent? • Internet was built on trust and email also works in the same fashion • No authentication exists between ISP to send emails • SPAM abuse is high as this trust is misused 3
  • 4. What ISP’s are doing? • ISP’s nowadays actively block IP ranges that they believe generate SPAM • ISP’s employ a range of software to categorize email as JUNK, SPAM, Phishing, etc… • Countries are actively legislating to punish offenders 4
  • 5. What companies are worried about? • Email deliverability • Ensure email reaches the Inbox of the recipients • Handle ISP reports • Complaints • Bounces • Statistics • Keep delivery costs low 5
  • 6. Deliverability • Refers to the likelihood of the email reaching the intended destination • Majority of global email traffic is either unsolicited or undesired bulk email • 88 to 92% of email traffic in year 2010 were spam • Due to the security measures of ISP, even genuine emails are marked as SPAM causing the company’s reputation to be downgraded from a users perspective • Users are nowadays extremely cautious about clicking any links in email that are marked as SPAM 6
  • 7. ISP reports • ISP’s respond to origin with reports on emails that were processed by the systems • Bounces – Messages sent to non existent email address • Rejections – Size limitations and attachment types • Complaints – Complaints about email content, etc… • Email systems need to handle these responses and need to proactively handle the issue • Ignoring reports can force an ISP to block the IP address of origin 7 server causing email outage
  • 8. Statistics • Email Statistics are an essential component of a business application to understand the reach of emails • Successful deliveries • Click tracking • Failure reports • The above statistics are vital to understand the success of email marketing and campaigns • This data adds business benefit to ensure that the customer can reach your system in case of emergency • Unable to deliver newly generated passwords since the users email 8 box is closed
  • 9. Amazon Web Services AMAZON SIMPLE EMAIL SERVICE (SES) 9
  • 10. Amazon Simple Email Service Features Benefits • Simple Setup • Simple • Zero Infrastructure • Inexpensive • Bulk & transactional email- sending service • Reliable • Standard SMTP service • Scalable • DKIM support • No upfront costs • API availability • Workflow Integration 10
  • 11. About SES What is it What its not • Its an email delivery service • Not a replacement for your for bulk and transactional exchange servers. It doesn’t system receive emails • Not a marketing tool for • Supports both SMTP and API sending bulk messages and based access track status. You’ve to build the system on top of SES • Offers support for setting up DKIM and signing messages • Not a guaranteed email service that handles everything for you. It helps • Offers endpoint to receive you to build a guaranteed information on email delivery delivery system. 11
  • 12. How SES helps business? • Offers easy interface to help with complex setups like DKIM, etc.. • Offers a scalable, highly available service for sending emails • Offers feedback loops to handle bounces and complaints • Offers a no CAPEX model for your email delivery setup • Automatically filters your content to prevent SPAM messages from being sent out if your infrastructure is compromised • Requires no changes to existing applications since SES is 12 compliant with SMTP protocol
  • 13. DKIM Signing • DomainKeys Identified Mail (DKIM) is a standard that allows senders to sign their email messages and ISPs to use those signatures to verify that those messages are legitimate and have not been modified by a third party in transit. • DKIM signing helps in deliveryability of email messages as ISP’s can verify the sender’s domain for authenticity. • DKIM Setup in SES can be done in 2 ways • Easy DKIM using the SES console • Manual DKIM signing by using the SES REST API 13
  • 14. Easy DKIM Signing 1 • Verify a new Domain • Generate DKIM Settings • Add the DNS records with your registrar • 1 TXT record 2 • 3 CNAME records 3 14
  • 15. Error Handling • SES offers endpoints to handle the following errors:- • Bounces • Complaints • SES can be configured to handle errors in the following ways:- • SNS topics (HTTP endpoints) • Email Forwarding 15
  • 16. Send Rates • Depending on the needs of the application, SES throttles the maximum messages that you can send in a second • Adherence to this rate is essential to ensure SES service availability • You can request the SES team to increase the rates if your application needs are more • Send rates improve based on email quality and decreases based on JUNK/SPAM/Bounces 16
  • 17. Amazon Simple Email Service (SES) SCALABLE EMAIL ARCHITECTURE 17
  • 19. Delivery Workflow • Application logs a queue message for sending email • Email service polls the queue to get the message • Locks the queue message as being processed • Parses the message to identify the message and recipient • Calls SES to send the email message to the recipient • Deletes the message from queue on success 19 • Marks the message as unread if failure in SMTP connectivity
  • 20. Email Service • Independent Tier to handle Email delivery • Can be multi threaded / multi instance for scale • Distributed architecture for handling failures • Has logic to handle the following • Log bounces to prevent resending to an non existent address • Control send rates based on configuration • Failover in case SES is down to switch to a different SMTP service • Can be independently tested 20 • Can offload logic to generate email messages based on a email event – template pattern
  • 21. Bounce Handling • SES receives the bounce message from ISP • SES sends the message to the SNS topic configured for bounces • SNS sends the message to the subscriptions • Can be an email address to manually handle the bounces • Can be an HTTP endpoint for an application to process the message immediately • Can be an SQS queue for distributed processing (Current Architecture) • Email Service polls the SQS bounce queue to receive the bounces • Takes appropriate actions based on the setup • Mark the email address as non functional in database • Maintain its own store of failed email address (Validates against this every time when an email needs to be sent out) • Sends an alert to the user’s alternate email address about the 21 applications inability to reach the user
  • 22. Load Testing your service • The email service can be independently tested as it is not directly linked to the main application • Email service capabilities like bounce handling can be tested by using the new SES mailbox simulator • You can read more about the mailbox simulator here • http://aws.amazon.com/about-aws/whats- new/2012/10/03/amazon-simple-email-service-announces- mailbox-simulator/ 22 • Using the mailbox simulator will not affect your SES reputation
  • 23. SES safety measures • SES is a cost-effective email delivery service • Being cost-effective makes it attractive for spammers • Bounces are unavoidable in an internet accessible application that allows registrations. • SES evaluates your reputation on the following basis:- • Bounce Percentage • Complaints received • Quality of emails • SES takes these parameters seriously and can block production access when SES service is abused 23 • As long as the bounce percentage and the quality of emails are good, SES is a cost-effective service for your emailing needs
  • 24. Jithendra Balakrishnan HAPPY EMAILING 24 All Images copyrighted to respective authors