serverless architectures

47
Serverless Architectures RANGANATHAN BALASHANMUGAM @ran_than

Upload: hyderabad-scalability-meetup

Post on 11-Jan-2017

62 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Serverless architectures

Serverless Architectures

RANGAN ATHAN BAL ASHANMUGAM

@r an_than

Page 2: Serverless architectures

“What Is The Output Of Software?”

Page 3: Serverless architectures

What Is Software Design?

SRC : HTTP ://WWW.DEVELOPERDO T S TAR .COM/MAG/AR T ICLES/REEVES_DES IGN .HTML

J ACK W. REEVES - 1992

— - IN 3 S L IDES — -

Page 4: Serverless architectures

THE F IN AL GOAL OF ANY ENG INEER ING ACT I V I T Y I S SOME T YPE OF

DOCUMENTATION

WHEN THE DES IGN EFFOR T I S COMPLETE ,

THE DES IGN DOCUMENTAT ION I S TURNED OVER T O THE

MANUFACTUR ING TEAM.

SRC : HTTP ://WWW.DEVELOPERDO T S TAR .COM/MAG/AR T ICLES/REEVES_DES IGN .HTML

Page 5: Serverless architectures

“G IVEN THAT SOFT WARE DES IGNS ARE REL AT I VELY EAS Y T O TURN OUT

AND

ESSENT IALLY FREE T O BU I LD , AN UNSURPR IS ING REVEL AT ION I S THAT

SOFT WARE DES IGNS TEND T O BE INCRED IBLY L ARGE AND COMPLEX .”

SRC : HTTP ://WWW.DEVELOPERDO T S TAR .COM/MAG/AR T ICLES/REEVES_DES IGN .HTML

Page 6: Serverless architectures

“SOFT WARE MAY BE CHEAP T O BU I LD ,

BUT I T I S INCRED IBLY EXPENS IVE T O DES IGN .”

SRC: HTTP ://WWW.DEVELOPERDO T S TAR .COM/MAG/AR T ICLES/REEVES_DES IGN .HTML

Page 7: Serverless architectures

“S IMPL I F I C AT ION I S THE TECHNOLOGY TREND FOR 2016 .”

- WERNER VOGEL , C T O @ AMAZON

Page 8: Serverless architectures

“ THE B IR TH OF ANY BREAK THROUGH TECHNOLOGY HAS A TENDENCY T O SPARK F I ERCE D ISCOURSE .”

@au th0

Page 9: Serverless architectures

Evolution Of Architectures

Page 10: Serverless architectures

Monolith

SRC : AW S

Page 11: Serverless architectures

3-tier

PRESENTAT ION LOG IC DB

IMAGE SRC : AW S

Page 12: Serverless architectures

3-tier - Evolved

SRC : HTTPS ://READ .ACLOUD .GURU/SERVERLESS - THE - FUTURE -OF - SOFT WARE - ARCH I TECTURE -D4473FFED864# .KOX11S8OH

Page 13: Serverless architectures

Service Oriented Architecture

SRC : AW S

Presentation Tier Logic Tier

Data Tier

Page 14: Serverless architectures

Microservices Architecture

SRC : AW S

Page 15: Serverless architectures

DATA CENTER PAASIAAS SERVERLESS!

ABS TRACT S :

HOS T ING

ENV IRONMENT

ABS TRACT S :

PHY S IC AL HARDWARE

ABS TRACT S :

OS

ABS TRACT S :

L ANGUAGE

RUNT IME

Page 16: Serverless architectures

BARE METAL CONTAINERSVIRTUALIZATION SERVERLESS!

HIGH

LOW

• Operational costs

• Time to deploy

• Maintenance

Page 17: Serverless architectures

Serverless?

Page 18: Serverless architectures

Serverless?

Page 19: Serverless architectures

“UPLOAD YOUR CODE AND RUN YOUR FUNCT IONS .”

Page 20: Serverless architectures

What Is Serverless? - Simpler• Functions

• Functions => Runtimes

• Events trigger functions

• Functions execute on demand

• Infra costs are only by execution

• Continous scaling

• Servers are not developers responsibility

Page 21: Serverless architectures

“ THE ESSENCE OF THE SERVERLESS TREND I S THE ABSENCE OF

THE SERVER CONCEPT DUR ING SOFT WARE DEVELOPMENT.”

@au th0

Page 22: Serverless architectures

“MY S T ORY - F I X ING THE FRAMEWORK”

Page 23: Serverless architectures

Serverless On Aws• API gateway.

• Lambda.

• S3 - static content.

• Dynamo DB to persist data.

• Other resources.

Page 24: Serverless architectures

MICROSERV ICES

MONOL I TH

What About Microservices?

MICROSERV ICES

MICROSERV ICES

MICROSERV ICES

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

Page 25: Serverless architectures

What About Microservices?FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

Page 26: Serverless architectures

MICROSERV ICE

What About Microservices?

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

AP I GATEWAY

Page 27: Serverless architectures

MICROSERV ICE

What About Microservices?

FUNCT ION

FUNCT ION

FUNCT ION

FUNCT ION

AP I GATEWAY

Page 28: Serverless architectures

“Focus On Functions”

Page 29: Serverless architectures

Function - Expectations• Do one thing

• Idempotent

• Finish fast

Page 30: Serverless architectures

GOOGLE CLOUD FUNCT IONSAW S L AMBDA MICROSOFT AZURE

CLOUD FUNCT IONS

Platforms

I RON . IOIBM OPENWHISK

Page 31: Serverless architectures

Frameworks

KAPPA

Page 32: Serverless architectures

Google Cloud Functions• https://cloud.google.com/functions/

docs/tutorials/

Page 33: Serverless architectures

Microsoft Azure Cloud Functions• https://azure.microsoft.com/en-us/

services/functions/

• Demo

Page 34: Serverless architectures

IBM OpenWhisk

Page 35: Serverless architectures
Page 36: Serverless architectures

Iron.IO

SRC : I RON . IO

Page 37: Serverless architectures

Amazon AWS Lambda

Amazon S3

DYN AMICS TAT IC

Page 38: Serverless architectures

Why Serverless?• As developer, you may just need to

respond to events with some functions.

• From 24/7 running servers to pay per function execution.

• Easy configuration and deployment.

Page 39: Serverless architectures

Why NOT Serverless?• As Microservices, if the system grows,

complexity grows. Managing 1 server is better than, managing 500 functions.

• Early stage, limited tools and monitoring.

• As of now, only fewer languages/runtimes are supported.

• Local/Offline testing

• Vendor lock???

• Stateless servers

Page 40: Serverless architectures

USE C ASES

Page 41: Serverless architectures

A Cloud Guru social learning

SRC : HTTPS ://READ .ACLOUD .GURU/SERVERLESS - THE - FUTURE -OF - SOFT WARE - ARCH I TECTURE -D4473FFED864# .KOX11S8OH

Page 42: Serverless architectures

Instant - The serverless startup

SRC : HTTPS ://BLOG . INS TANT.CM/A -C ASE - S TUDY -OF - TE LETEXT - IO - THE - SERVERLESS - S TAR TUP -C1E08022BDC2# .H6QH2EA2C

Page 43: Serverless architectures

Instant - Architecture

SRC : HTTPS ://BLOG . INS TANT.CM/A -C ASE - S TUDY -OF - TE LETEXT - IO - THE - SERVERLESS - S TAR TUP -C1E08022BDC2# .H6QH2EA2C

• Authentication: Google JS, AWS Cognito

• Editing text: API Gateway

• Handling the drafts: Lambda

• Storing drafts: DynamoDB

• Serving live content: S3 and CloudFront

• No Devops

• No scaling issues

• Pay for usage, not uptime

Page 44: Serverless architectures

Url Shortner

Page 45: Serverless architectures

What Is Serverless? - In A Slide• Functions

• Functions => Runtimes

• Events trigger functions

• Functions execute on demand

• Infra costs are only by execution

• Continous scaling

• Servers are not developers responsibility

• Platforms: AWS Lambda, Google cloud functions, Azure functions, IBM Openwhisk, iron.io

• Frameworks: serverless.com, apex, webtask, sparta, kappa, deployd, iopipe

Page 46: Serverless architectures

“ THE B IR TH OF ANY BREAK THROUGH TECHNOLOGY HAS A TENDENCY T O SPARK F I ERCE D ISCOURSE .”

@au th0

Page 47: Serverless architectures

THANK YOU

https://twitter.com/ran_than