serverless application - who the heck needs a server?

89
Serverless Applications Lars Röwekamp | CIO New Technologies | @mobileLarson open knowledge | #WISSENTEILEN

Upload: open-knowledge-gmbh

Post on 05-Apr-2017

122 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Serverless Application - Who the heck needs a Server?

Serverless ApplicationsLars Röwekamp | CIO New Technologies | @mobileLarson

open knowledge | #WISSENTEILEN

Page 2: Serverless Application - Who the heck needs a Server?

ÜBER OPEN KNOWLEDGEBranchenneutrale Softwareentwicklung und IT-Beratung

#WISSENTEILEN

Page 3: Serverless Application - Who the heck needs a Server?

ÜBER MICH

Wer bin ich - und wen ja, wie viele?

• CIO New Technologies • Enterprise & Mobile • Autor, Speaker, Coach & Mentor

• Snowboard & MTB Enthusiast• Mehrfacher Vater, einfacher Ehemann

Lars Röwekamp (a.k.a. @mobileLarson)

#WISSENTEILEN

LR

Page 4: Serverless Application - Who the heck needs a Server?

An Era of „Mindshift“

1 Mio € App(lication)

Page 5: Serverless Application - Who the heck needs a Server?

Time is Money

Page 6: Serverless Application - Who the heck needs a Server?

An Era of „Mindshift“

App BusinessPlan ...

Page 7: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Servers?(OS? Files & Storage? CPU? Memory?)

Page 8: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Customers?(Start small! Grow fast! Die faster?)

Page 9: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Traffic?(Moderate but peeks!)

Page 10: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Security?(OS? Patches? Access Control?)

Page 11: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Depends ...!(Go for max? Way to expensive!)

Page 12: Serverless Application - Who the heck needs a Server?

I had a dream ...

Page 13: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Serverless

Page 14: Serverless Application - Who the heck needs a Server?

„Kein Server ist einfacher zu

verwalten, als kein Server.“

(Werner Vogels, CTO Amazon)

Page 15: Serverless Application - Who the heck needs a Server?

Out-of-the-Box self-scalingBackend

> IaaS> PaaS> BaaS

Page 16: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

Page 17: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

IaaS

Road to less Server

Page 18: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

IaaSPaaS

Road to less Server

Page 19: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

IaaSPaaS?

Page 20: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

IaaSPaaSBaaS

Page 21: Serverless Application - Who the heck needs a Server?

Ain‘t gonna work!

Page 22: Serverless Application - Who the heck needs a Server?

Ain‘t gonna work!

My Business LogicMy Integration Logic

My Event-based Logic

Page 23: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

IaaSPaaSBaaS

Page 24: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

Page 25: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

Page 26: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

Page 27: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

Page 28: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Fa#!? WTH?(a.k.a. Serverless)

Page 29: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Run Code, not Server!

Page 30: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

“Run your code highly-available in the cloud in response to events and scale without any servers to manage.“

Page 31: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

• High Availability• Zero Administration• Auto-Scaling• Your Code

Page 32: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

• High Availability• Zero Administration• Auto-Scaling

•Your Code

Page 33: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Road to less Server

• High Availability• Zero Administration• Auto-Scaling

•Your Code• Sharing Resources• Security related Issues• Access to other Resources

Page 34: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Serverless

Page 35: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Main Player

AWS Lamdba

Google Cloud Functions *)

MicrosoftAzure Functions

IBM OpenWhisk**)

Page 36: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

The Main Player

AWS Lamdba(serverless, event-driven compute service)

Page 37: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

How does it work?

S3 Bucket

DynamoDB

Kinesis

EVENT

EVENT

INVOKE

Stateless Code(a.k.a. AWS Lambda)

Page 38: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

How does it work?

S3 Bucket

DynamoDB

Kinesis

INVOKE

INVOKE

RETURN

Stateless Code(Node, Python, Java, C#)

Page 39: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Subscribe to ...

Amazon S3

Amazon DynamoDB

Amazon Kinesis

AWS CloudFormation

AWS CloudTrail

Amazon CloudWatch

Amazon SNS

AmazonSES

AmazonAPI GatewayAmazon

Cognito

AWSIoT

AmazonAlexa

CronEvents

DATA STORES ENDPOINTS

REPOSITORIES EVENT/MESSAGE SERVICES

Amazon Config

Page 40: Serverless Application - Who the heck needs a Server?

Anatomy ofa Lambda

Function

Page 41: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Anatomy

Lambda Function

Page 42: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Anatomy

Handler Function

Lambda Function

</>

„...“

Event Object

Context Object

...{

Page 43: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Anatomy

Handler Function

Lambda Function

</>

„...“

Event Object

Context Object

...{

Page 44: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Anatomy

Handler Function

Lambda Function

</>

„...“

Event Object

Context Object

...{IAM Role

Page 45: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Anatomy

Handler Function

Lambda Function

</>

„...“

Event Object

Context Object

...{IAM Role

Return Object*

Page 46: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Anatomy

Lambda Function

1. Number of Calls*2. Memory Usage**{IAM Role

Return Object*(*first 1 million for free, **first 400.000 sec free for 1 GB memory)

Page 47: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Scenarios(gimme some “Demos“)

Page 48: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

FaaS Scenarios

• Data & File Processing• Data and Analytics • Websites• Mobile Applications

Page 49: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“

Thumbnail Creation(Data & File Processing)

Page 50: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“

Page 51: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“

Page 52: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“ V2.0

Trend & Fault Detection(Event Streaming)

Page 53: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“ V2.0

Page 54: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“ V3.0

Web Application(Custom Events)

Page 55: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“ V3.0

Page 56: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello World“ V4.0

Resource Optimization(ELSE-Branch)

if (normalCase) {runOnMyServer();

} else { runLambdaInTheCloud();

}

Page 57: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Doing it the right Way

AWS Lamdba SDK Amazon API Gateway

vs.

Page 58: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Doing it the right Way

• RESTful API Gateway• Caching via CDN• DDoS Protection• Throttling Capabilities• API Stages• Decoupling of C/S Amazon API Gateway

Page 59: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Serverless App Architecture

Page 60: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Serverless App Architecture

Page 61: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Demo(damn, gimme some REAL Demo!)

Page 62: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello REAL World“

Page 63: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello REAL World“

Page 64: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello REAL World“

Page 65: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello REAL World“

Page 66: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello REAL World“

Page 67: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

„Hello REAL World“

Page 68: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

AWSOME!(But what‘s about ...?)

Page 69: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Versioning(Version vs. Alias)

Page 70: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Security(Push vs. Pull Policy)

Page 71: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Concurrency(max 200 at once, max 300 sec)

Page 72: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#ErrorHandling(What‘s the Retry Policy?)

Page 73: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Tracing(Who? When? Where? What?)

Page 74: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Monitoring(Logs & Metrics)

Page 75: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Testing(„If i test, i do it in Production!“)

Page 76: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Deployment(DIY vs. Tooling)

Page 77: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#NoOps(Ok, let‘s call it „LessOps“)

Page 78: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#VendorLock(Adrian said: „2*Vendor << DIY“)

Page 79: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Pricing(Never pay for idle!)

Page 80: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#BestPractices(Keep calm and ...)

Page 81: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

#Pitfalls(cold, warm, hot)

Page 82: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Fazit

Page 83: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Run Code, not Server!

Page 84: Serverless Application - Who the heck needs a Server?

#WISSENTEILEN

Don‘tpay Idle!

Page 85: Serverless Application - Who the heck needs a Server?

1 Mio € App

Page 86: Serverless Application - Who the heck needs a Server?

Yeah, all Work done!

Page 87: Serverless Application - Who the heck needs a Server?

? ? ?FRAGEN

#WISSENTEILEN

Page 88: Serverless Application - Who the heck needs a Server?

Kontakt

LARS RÖWEKAMPCIO NEW TECHNOLOGIES

[email protected]+49 (0)441 4082 – 101

@mobileLarson@_openknowledge

OFFENKUNDIGGUT

#WISSENTEILEN

Page 89: Serverless Application - Who the heck needs a Server?

Bildnachweise

#12: © RichVintage – istockphoto.com#14: © Guido van Nispen – Wikipedia#21: © vasakna – fotolia.com#40, #88 : © pathdoc - fotolia.com#85: © tomer_turjeman – fotolia.com

All other pictures inside this presentation orginate frompixabay.com.

#WISSENTEILEN