Serverless Architectures RANGANATHAN BALASHANMUGAM @ran_than
Serverless Architectures
RANGAN ATHAN BAL ASHANMUGAM
@r an_than
“What Is The Output Of Software?”
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 — -
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
“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
“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
“S IMPL I F I C AT ION I S THE TECHNOLOGY TREND FOR 2016 .”
- WERNER VOGEL , C T O @ AMAZON
“ THE B IR TH OF ANY BREAK THROUGH TECHNOLOGY HAS A TENDENCY T O SPARK F I ERCE D ISCOURSE .”
@au th0
Evolution Of Architectures
Monolith
SRC : AW S
3-tier
PRESENTAT ION LOG IC DB
IMAGE SRC : AW S
3-tier - Evolved
SRC : HTTPS ://READ .ACLOUD .GURU/SERVERLESS - THE - FUTURE -OF - SOFT WARE - ARCH I TECTURE -D4473FFED864# .KOX11S8OH
Service Oriented Architecture
SRC : AW S
Presentation Tier Logic Tier
Data Tier
Microservices Architecture
SRC : AW S
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
BARE METAL CONTAINERSVIRTUALIZATION SERVERLESS!
HIGH
LOW
• Operational costs
• Time to deploy
• Maintenance
Serverless?
Serverless?
“UPLOAD YOUR CODE AND RUN YOUR FUNCT IONS .”
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
“ THE ESSENCE OF THE SERVERLESS TREND I S THE ABSENCE OF
THE SERVER CONCEPT DUR ING SOFT WARE DEVELOPMENT.”
@au th0
“MY S T ORY - F I X ING THE FRAMEWORK”
Serverless On Aws• API gateway.
• Lambda.
• S3 - static content.
• Dynamo DB to persist data.
• Other resources.
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
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
MICROSERV ICE
What About Microservices?
FUNCT ION
FUNCT ION
FUNCT ION
FUNCT ION
AP I GATEWAY
MICROSERV ICE
What About Microservices?
FUNCT ION
FUNCT ION
FUNCT ION
FUNCT ION
AP I GATEWAY
“Focus On Functions”
Function - Expectations• Do one thing
• Idempotent
• Finish fast
GOOGLE CLOUD FUNCT IONSAW S L AMBDA MICROSOFT AZURE
CLOUD FUNCT IONS
Platforms
I RON . IOIBM OPENWHISK
Frameworks
KAPPA
Google Cloud Functions• https://cloud.google.com/functions/
docs/tutorials/
Microsoft Azure Cloud Functions• https://azure.microsoft.com/en-us/
services/functions/
• Demo
IBM OpenWhisk
Iron.IO
SRC : I RON . IO
Amazon AWS Lambda
Amazon S3
DYN AMICS TAT IC
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.
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
USE C ASES
A Cloud Guru social learning
SRC : HTTPS ://READ .ACLOUD .GURU/SERVERLESS - THE - FUTURE -OF - SOFT WARE - ARCH I TECTURE -D4473FFED864# .KOX11S8OH
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
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
Url Shortner
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
“ THE B IR TH OF ANY BREAK THROUGH TECHNOLOGY HAS A TENDENCY T O SPARK F I ERCE D ISCOURSE .”
@au th0
THANK YOU
https://twitter.com/ran_than