AWS User Group Dublin - Using AWS Lambda as a push notification cannon

14
Using AWS Lambda as a push notification cannon AWS Usergroup Dublin MeetUp #15 Daniel Taschik – 09/06/2016

Transcript of AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Page 1: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Using AWS Lambda as a push notification cannonAWS Usergroup Dublin MeetUp #15

Daniel Taschik – 09/06/2016

Page 2: AWS User Group Dublin - Using AWS Lambda as a push notification cannon
Page 3: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

We hit a nerve.

100M Users

192 Countries

1.5BVideos

Page 4: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Dubsmash 2.0

Connect Create Communicate

Page 5: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Sending hundreds of million of pushes using AWS

Lambda

Page 6: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Use Cases for Pushes at Dubsmash

Page 7: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Challenges

+

Global User Base Real-time delivery Tracking

Page 8: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

3 Steps

1. Device registration

2. Sending push notifications

3. Result processing

Page 9: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

1.) Device Registration

register with push token

ARN & device data

worker

SNS

SQS device store

Page 10: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

2.) Sending Push Notification

Push Trigger

device data store

load targeted devices

slice device batch in batches of 35k

notification scheduler

SNSLambdanotification dispatcher

wrap notifications for max. SNS payload

~ 300 recipients

push!

SNS

Page 11: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Code example

Page 12: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

3.) Result Processing

SNS

Lambda

SQS

Lambda results

worker device store

delivery results / APNS Feedback Service

deactivate/ update devices

Push!

Page 13: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Some metrics

>520M

pushes sent last months

>3.7M

Lambda invocations

>12.3M

seconds of Lambda compute time

<10min*

to send 15M pushes at once

14Gb/8Core

hardware for scheduling

2Gb/2Core

hardware for dispatcher

Page 14: AWS User Group Dublin - Using AWS Lambda as a push notification cannon

Let’s say it with video!

Thank you

[email protected] | @dtaschik