Slide 1

Slide 1 text

simalexan Meet Sloba

Slide 2

Slide 2 text

simalexan

Slide 3

Slide 3 text

simalexan

Slide 4

Slide 4 text

simalexan Have you heard of serverless? Its me!

Slide 5

Slide 5 text

simalexan No server management / ops Scales per use Autofailover Don’t pay 
 for idle

Slide 6

Slide 6 text

simalexan Business is more profitable Faster delivery

Slide 7

Slide 7 text

simalexan Code needs to run on servers! Serverless? That’s not the point! You’re an idiot

Slide 8

Slide 8 text

simalexan How to use AWS Lambda on a 
 real-world use case Intro to Serverless

Slide 9

Slide 9 text

simalexan Aleksandar Simovic Senior Software Engineer @ ScienceExchange AWS Serverless Hero coauthor of “Serverless Applications with Node.js” book AWS SAM & Lambda Builders Contributor Co-organizer of JS Belgrade, Serverless Belgrade, Wardley Maps Belgrade meetups

Slide 10

Slide 10 text

simalexan What is 
 serverless, really?

Slide 11

Slide 11 text

@simalexan Server OS Platform App

Slide 12

Slide 12 text

@simalexan

Slide 13

Slide 13 text

@simalexan

Slide 14

Slide 14 text

@simalexan

Slide 15

Slide 15 text

@simalexan

Slide 16

Slide 16 text

simalexan But that Lambda
 runs on
 an AWS server?

Slide 17

Slide 17 text

simalexan It is serverless, 
 the same way WIFI is wireless. Gojko Adzic

Slide 18

Slide 18 text

simalexan

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

simalexan Ok, now I want 
 to hear more…

Slide 21

Slide 21 text

simalexan Event model 
 (with listeners)

Slide 22

Slide 22 text

simalexan Not just AWS Lambda And so many more…

Slide 23

Slide 23 text

simalexan • Node.js, Java, Python, C#, Go, many others as well • Power from 128MB - 3GB • CPU and network allocated proportionately • Synchronous or async • Voice enabled devices • Securely grant access to resources and VPCs • Fine grained control Your own code Simplified resource model Flexible use Flexible authorization AWS Lambda

Slide 24

Slide 24 text

simalexan • Cloud9 - online editor • VSCode, Eclipse tools • Metrics for requests, errors, and throttles • Built-in logs • Use processing, threads, 
 /tmp, sockets • AWS SDK built-in • Persist data using external storage • No affinity or access to underlying infrastructure Authoring functions Monitoring and logging Programming model Stateless AWS Lambda

Slide 25

Slide 25 text

simalexan • Pay for compute time in 100ms increments • No hourly, daily or monthly minimums • No per-device cost • Never pay for idle • 1 million requests FREE every month, every customer Pay-per-use pricing

Slide 26

Slide 26 text

simalexan What can we use 
 this “serverless” for?

Slide 27

Slide 27 text

simalexan • Static websites • Complex web apps • Apps and services • Mobile • IoT • Real-time • MapReduce • Batch • Text / SMS Chatbots • Voice assistants • Voice enabled devices • Machine Learning • AR / VR Web Apps Backends Data processing Chatbots Amazon Alexa Machine learning Common serverless use cases

Slide 28

Slide 28 text

simalexan Who uses Lambda?

Slide 29

Slide 29 text

simalexan

Slide 30

Slide 30 text

simalexan Show me the ones you were personally know or are involved!

Slide 31

Slide 31 text

simalexan Real world use case #1

Slide 32

Slide 32 text

simalexan

Slide 33

Slide 33 text

simalexan

Slide 34

Slide 34 text

simalexan CodePen’s problems (2016)

Slide 35

Slide 35 text

simalexan • Team of mostly frontend devs + one DevOps • Ruby on Rails backend • Many preprocessors that needs full isolation • > 200k requests/hour in peak • Unexpected peaks 
 (you never know when some pen will become popular)

Slide 36

Slide 36 text

simalexan

Slide 37

Slide 37 text

simalexan • Full isolation between services
 • Auto-scaling (up to 5000 parallel requests)
 • Decreased infrastructure cost 
 (250 million requests costs $1180/month)
 • More DevOps time for RoR part of the app
 • Frontend developers with superpowers?!

Slide 38

Slide 38 text

simalexan More!

Slide 39

Slide 39 text

simalexan Real world use case #2 MindMup

Slide 40

Slide 40 text

simalexan

Slide 41

Slide 41 text

simalexan • >750,000 users per month • ~$107 / month. • Company size of two people • Migration to serverless - one month MindMup

Slide 42

Slide 42 text

simalexan Real world use case #3 ScienceExchange

Slide 43

Slide 43 text

simalexan • Integration with an accounting SaaS • Constant influx of events • Potential costs $50,000 / year • Necessary for finance, data science and analytics teams • Decided to build the project in-house 
 (estimation 3 months) ScienceExchange

Slide 44

Slide 44 text

simalexan Science Exchange

Slide 45

Slide 45 text

simalexan • Saving $49,990 / year • Development took 2 weeks • Scales automatically • Operational costs: $0.09 per GB ScienceExchange

Slide 46

Slide 46 text

simalexan How can I do it?

Slide 47

Slide 47 text

simalexan Demo Time!

Slide 48

Slide 48 text

simalexan

Slide 49

Slide 49 text

simalexan serverless.pub/book “Serverless Applications with Node.js" claudia40 40% off Hvala!