56
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MBL204 November 29, 2016 How Netflix Achieves Email Delivery at Global Scale with Amazon SES Best Practices for Building Scalable and Reliable Email Applications using Amazon SES Devika Chawla, Netflix Kadir Rathnavelu, Amazon SES

AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Embed Size (px)

Citation preview

Page 1: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

MBL204

November 29, 2016

How Netflix Achieves Email Delivery at Global Scale

with Amazon SESBest Practices for Building Scalable and Reliable Email Applications using Amazon SES

Devika Chawla, Netflix

Kadir Rathnavelu, Amazon SES

Page 2: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Challenges with Email Sending

• Delivery of email to your recipient’s inbox is hard

• Managing the complaint feedback loop is complex

• The undifferentiated heavy lifting of setting up an email

infrastructure

Page 3: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Netflix Email Delivery at Global Scale with

Amazon SES

Page 4: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Agenda

• Netflix Email Overview

• History, Challenges & Motivation for Amazon SES

• Move to Amazon SES

Page 5: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Netflix Email Overview

Page 6: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Netflix Ecosystem

Page 7: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Sign up flow

Page 8: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Sign up flow

Page 9: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Sign up flow

Page 10: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Sign up flow

Page 11: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Non Member – Remarketing Series

Page 12: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Sign up flow

Page 13: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Members - Welcome Series

Page 14: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Members – Personalized Messages

Page 15: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Cancel Membership

Page 16: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Former Member - Rejoin Series

Page 17: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Emails across the customer lifecycle

Acquisition

Engagement Transactional

Rejoin

Page 18: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Message Classification

Member - Transactional

Most Important

Very Low Risk

Member - Other

Very Important

Low Risk

Non/Former Member

Important

Medium Risk

Page 19: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

History, Challenges &

Motivation for Amazon SES

Page 20: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Messaging Platform in AWS & Send from Data Center

us-west-2 us-east-1 eu-west-1

Page 21: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Challenges

• Keep email delivery software running in Data Center

• Optimize settings for ISPs

• Process bounce logs

• Work with 3rd party for complaint feedback loop

• Process complaint feedback

Page 22: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Challenges

Page 23: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Requirements for Netflix Email

• Great Deliverability for 100 million plus messages/day

• Linear scale with global subscriber growth, at cost

• Multiregion delivery of transactional messages

• Risk Isolation for different types of messages

• Operational simplification

Page 24: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Move to Amazon SES

Page 25: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Dedicated Pools of IPs

Messages

Message

Processor

Message

Metadata

Service

SES

Transactional

Pool

SES

Member

Pool

SES

Non/Former

Member

Pool

Password

Reset

New

Season

Re-

marketing

Page 26: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Multi Region Presence

us-west-2 us-east-1 eu-west-1

SESSES SES

Page 27: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Streamlined Feedback for Delivery, Bounces, Complaints

Delivered/sec Bounces/sec

Complaints/sec Latency – 95th Percentile

Page 28: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Gradual Ramp up to Amazon SES (IP Warming)

us-west-2 us-east-1 eu-west-1

SESSES SES

Page 29: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

IP Reputation (from 3rd Party vendor)

Page 30: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Inbox Deliverability (from 3rd Party vendor)

Page 31: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Migration

Monitor

Bounces

IP Reputation

Inbox Deliverability

Increase Traffic to SES

Page 32: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

100% Emails on Amazon SES

us-west-2 us-east-1 eu-west-1

SESSES SES

Page 33: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Building Scalable and Reliable Email

Applications

Page 34: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Reiterating the challenges with sending emails

• The reputation of the email sender

• Managing the complaints feedback loop is complex

• The undifferentiated heavy lifting of setting up an email

infrastructure

Page 35: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Amazon SES eliminates these challenges

• Delivering emails to an inbox is a shared responsibility

• Amazon SES provides…

• Higher deliverability via proactive reputation management

• Maintains complaint feedback loops with major ISPs

• Elasticity

• High availability

• The breadth of features to build reliable sending programs

Page 36: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Fundamentals of Setting up an

Email Program

Page 37: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Setting up email authentication

• Verify an email address or a domain

Page 38: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Setting up email authentication

• Verify an email address or a domain

• Set up DomainKeys Identified Mail (DKIM)

Page 39: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

DomainKeys Identified Mail (DKIM)

• An authentication standard that allows you to sign your email

cryptographically

• ISPs decode the cryptographic signature using a public key to

ensure that your emails are not modified in transit

• Set up DKIM for your domain with DKIM from Amazon SES Console

Page 40: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Setting up email authentication

• Verify an email address or a domain

• Set up DomainKeys Identified Mail (DKIM)

• Add an Sender Policy Framework (SPF) record

Page 41: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Sender Policy Framework (SPF)

• SPF indicates which mail servers are authorized to send email for

their domain

• Receiving mail server compares MAIL FROM domain’s DNS record

for authorization

• Two ways to set up SPF on Amazon SES

• Use default MAIL FROM domain of Amazon SES

• Publish an SPF record

Page 42: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Setting up email authentication

• Verify an email address or a domain

• Set up DomainKeys Identified Mail (DKIM)

• Add an Sender Policy Framework (SPF) record

Page 43: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

More on set up

• Use Mailbox Stimulator for scalability testing

• Use HTTP instead of SMTP

• Send in Parallel

Page 44: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Feedback Processing

Page 45: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Why do you want to process feedback?

• Listen to feedback about the emails you send

• Delivered

• Bounce

• Complaints

• Acting on bounces and complaints improves the deliverability of

your emails

• Improves customer experience

Page 46: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Monitoring your sending activity

Monitoring Method How to Access Data Level of Detail Granularity

Feedback Notifications Amazon SNS, or Email Details on each

event

Across entire AWS Account

Event Publish Amazon CloudWatch, or Amazon

Kinesis Firehose

Details on each

event

Fine grained (based on

user-defined email

characteristics)

Page 47: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Amazon SES Event Publishing

• Fine-grained metrics based on a definable email characteristics like

marketing vs. transactional, product, etc.

• If you are selling music, you could define and track by ‘genre’

• Publish to Amazon CloudWatch or Amazon Kinesis Firehose

Page 48: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Amazon SES Event Publishing

• Create a configuration set

• Provide the name of the configuration

set, and one or more message tags

Page 49: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Amazon SES Event Publishing

• Amazon CloudWatch is best suited for aggregated metrics

• Metrics are available under Amazon SES namespace in Amazon

CloudWatch

• Event are aggregated by type and combination of specified dimensions

• Amazon Kinesis Firehose enables you to see individual events

• Stream data in to S3, Amazon Kinesis Analytics, Amazon Redshift, or

Elasticsearch Service Cluster

Page 50: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Dedicated IPs

Page 51: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Shared IPs

• Amazon SES customers send their emails from a single set of IP

addresses

• Everyone is responsible for the reputation of the IP addresses

Page 52: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

What are dedicated IPs?

• Dedicated IPs are Amazon SES IP addresses that are reserved

exclusively for your email sending

• Take more control and responsibility over the deliverability

• Scenarios:

• Segmenting mail streams for separate programs, or

engagement metrics

• Sending transactional mail, such as order confirmations, in

isolation from your marketing mail

• Send diagnostic or operational email from a certain set of IPs,

and reject all other mails

Page 53: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Dedicated IP addresses

• Your IP reputation will ultimately be driven by your own

sending practices

• Gradual warm up will reduce throttling and potential

rejects from the ISPs

• Start small

• Measure results

• Make corrections

• Ramp up the sending

Page 54: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Dedicated IP addresses

• Failure to keep the IPs warmed up will result in worse

deliverability

• You are responsible for estimating any potential volume

increases

Page 55: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Thank you!

Page 56: AWS re:Invent 2016: How Netflix Achieves Email Delivery at Global Scale with Amazon SES (MBL204)

Remember to complete

your evaluations!