Slide 1

Slide 1 text

A Jedi’s Guide to Migrating to Serverless CloudConf 2018 Aleksandar Simovic Torino, Italia

Slide 2

Slide 2 text

What we’ll be covering • Stepping stones to serverless • Serverless monoliths • Rethinking application processes • The function-by-function approach
 “Divide and conquer”

Slide 3

Slide 3 text

STAR WARS NERD ALERT If you have Star Wars phobia or mania, take care!

Slide 4

Slide 4 text

Serverless means… • No longer need to manage or configure servers • Pay only for used time • Automatically scaled per usage • Auto-failover and automated high scalability

Slide 5

Slide 5 text

Sounds great!

Slide 6

Slide 6 text

How do we go serverless?

Slide 7

Slide 7 text

“We’ll just build applications on serverless instead of cloud” Initially serverless seems like…

Slide 8

Slide 8 text

Simply… Attribution: Simon Wardley

Slide 9

Slide 9 text

Also known as “The Luke Skywalker approach”

Slide 10

Slide 10 text

“We just don’t think about servers anymore.” “I have a light saber, I am a Jedi.”

Slide 11

Slide 11 text

ANTI PATTERN ALERT Welcome to Serverless Monoliths!

Slide 12

Slide 12 text

Serverless Monoliths = Dark Side • Hard to maintain and test • Slower starting time • Kept all drawbacks from your previous state • Higher cost

Slide 13

Slide 13 text

Bundling many functionalities into a serverless function also means… every time you wanted to use your car, 
 you would have to assemble it first.

Slide 14

Slide 14 text

“Now we just don’t think about servers anymore.” Serverless is much more than

Slide 15

Slide 15 text

Migrating to serverless requires us to change how we think about application development …not just jump to serverless.

Slide 16

Slide 16 text

So, how should we migrate?

Slide 17

Slide 17 text

Learn from Luke’s mistakes

Slide 18

Slide 18 text

Function-by-function approach “Divide and Conquer” 1. Pick your already isolated services first
 “the low hanging fruit”

Slide 19

Slide 19 text

Function-by-function approach “Divide and Conquer” 2. Rethink and separate services into functions Hint: you don’t pay for your function storage, just usage.

Slide 20

Slide 20 text

Function-by-function approach “Divide and Conquer” 3. Divide your business processes into functions

Slide 21

Slide 21 text

Case Study: • Can’t predict the popularity of their pens • Have lots of unexpected peaks • Being able to serve is the key business goal • Spending lots on provisioning servers • Keeping lots of servers idle Problems:

Slide 22

Slide 22 text

Case Study: • Low hanging fruits 
 = preprocessors • Migrated all preprocessors into serverless functions • Separated their business process into functions • > 200,000 requests / h

Slide 23

Slide 23 text

Case Study: • Converters were eating too much resources • Too expensive Heroku dynos • Less isolation, could collide over resources • Hard to experiment Problems: MINDMUP

Slide 24

Slide 24 text

Case Study: • Low hanging fruits 
 = converters • Migrated all converters into functions • Separated business processes for payments, notifications, file storage • Half a million active users each month • Grew 30% in the migration period, 
 while reduced costs by 30% MINDMUP

Slide 25

Slide 25 text

Key points to remember • Identify your isolated problems. • Apply the “function-by-function” approach. • Analyze the remaining monolith services. • Repeat the approach.

Slide 26

Slide 26 text

“But can we use this approach everywhere?”

Slide 27

Slide 27 text

No. 
 Look at your current situation.

Slide 28

Slide 28 text

Case Study: Migrating User authentication

Slide 29

Slide 29 text

Reuse existing serverless components • Plug-and-play authentication and authorization services: AWS Cognito, Azure Active Directory, etc. • Easily add other authentication providers. • User groups. • Automated permission and policy systems.

Slide 30

Slide 30 text

Revised Steps • Identify isolated problems. • Check and replace these problems with existing serverless components. • Apply the “function-by-function” approach. • Analyze the remaining monolith services. • Repeat.

Slide 31

Slide 31 text

Summary • Serverless is much bigger than just 
 “no longer managing servers”. • Don’t just rush going serverless. Rethink. • Remember your context. Reuse. • Pick the low hanging “fruits” (services) first. • “Divide and conquer” your business processes into functions.

Slide 32

Slide 32 text

Learn more? Use code claudia40

Slide 33

Slide 33 text

Thank you! Questions? @simalexan