SlideShare a Scribd company logo
Serverless Microservices
Real life story of a Web App that uses AngularJS,
AWS Lambda and more
Eugene Istrati, Technology Partner
eugene@mitocgroup.com
www.mitocgroup.com
http://angular.camp
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Eugen Istrati, Partner @ Mitoc Group
Microservices Architecture
for Digital Platforms with AWS Lambda,
Amazon CloudFront, and Amazon DynamoDB
eugen@mitocgroup.com
October 2015
ARC201
About
Eugene Istrati
• eugene@mitocgroup.com
• Partner @ Mitoc Group Inc
• 15+ years in IT; 7+ years on AWS
• AWS Certified Solutions Architect
• Companies: Hearst, Amazon,
GrubHub, Tenaris (Europe)
Mitoc Group Inc
• www.mitocgroup.com
• Technology Company focusing on
Innovative Enterprise Solutions
• AWS Technology Partner
• Featured AWS Lambda Partner
• Media and Entertainment Industry
Agenda
• Reference Architecture
• Serverless Microservices
• Demo: todo.deep.mg
• Q&A
Demo: todo.deep.mg
• Inspired from open source
• www.todomvc.com
• Go to the GitHub repository
• github.com/MitocGroup/deep
-microservices-todomvc
• Follow the steps from Getting
Started to build and deploy
• todo.deep.com
Agenda
• Reference Architecture
• Serverless Microservices
• Demo: todo.deep.mg
• Q&A
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
• Requires DevOps with experience
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
• Requires DevOps with experience
• Flexible choice of technology
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
• Requires DevOps with experience
• Flexible choice of technology
• Requires devs with rich skill set
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
• Requires DevOps with experience
• Flexible choice of technology
• Requires devs with rich skill set
• Cost-effective
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
• Requires DevOps with experience
• Flexible choice of technology
• Requires devs with rich skill set
• Cost-effective
• Over-provisioning and over-paying
Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
• Scales in minutes
• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
• Requires DevOps with experience
• Flexible choice of technology
• Requires devs with rich skill set
• Cost-effective
• Over-provisioning and over-paying
AWS re:Invent 2014
Note: Credits and thanks are listed at the end of the presentation
AWS Summit NY 2015
Note: Credits and thanks are listed at the end of the presentation
Reference Architecture … Reinvented
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
S3 bucket
CloudFront
distribution
Web Tier
Cognito
Identity
DB Tier
SQS DynamoDB
LambdaCloudFront
logs
API Gateway
www.example.com
static.example.com
App Tier
AWS Region
RDS Aurora
Agenda
• Reference Architecture
• Serverless Microservices
• Demo: todo.deep.mg
• Q&A
What does “serverless” mean?
Not involving a server; composed only of clients.
http://www.wordsense.eu/serverless
Serverless doesn’t mean servers are no longer
involved. It simply means that developers no
longer have to think "that much" about them.
Computing resources get used as services
without having to manage around physical
capacities or limits.
https://www.quora.com/What-is-Serverless-Computing
Serverless vs. Reference
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
app
servers
app
servers
S3 bucket
CloudFront
distribution
Web Tier
Cognito
Identity
DB Tier
SQS DynamoDB
LambdaCloudFront
logs
API Gateway
www.example.com
static.example.com
App Tier
AWS Region
RDS Aurora
vs
Serverless Architecture – Web Tier
S3 bucket
CloudFront
distribution
Web Tier
Cognito
Identity
CloudFront
logs
www.example.com
static.example.com
Availability Zone A Availability Zone B
Auto Scaling Group
www.example.com
static.example.com
web
servers
web
servers
Serverless Architecture – Web Tier
S3 bucket
CloudFront
distribution
Web Tier
Cognito
Identity
CloudFront
logs
www.example.com
static.example.com
• Static Assets
• Same as in reference architecture
• css, js, docs, images, videos + html
• Dynamic Functionality
• Use JS framework (e.g. Angular)
• SEO-friendly (Custom Error
Response + HTML5 History API)
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
Serverless Architecture – Web Tier
S3 bucket
CloudFront
distribution
Web Tier
Cognito
Identity
CloudFront
logs
www.example.com
static.example.com
• Static Assets
• Same as in reference architecture
• css, js, docs, images, videos + html
• Dynamic Functionality
• Use JS framework (e.g. Angular)
• SEO-friendly (Custom Error
Response + HTML5 History API)
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
Serverless Architecture – Web Tier
S3 bucket
CloudFront
distribution
Web Tier
Cognito
Identity
CloudFront
logs
www.example.com
static.example.com
• Static Assets
• Same as in reference architecture
• css, js, docs, images, videos + html
• Dynamic Functionality
• Use JS framework (e.g. Angular)
• SEO-friendly (Custom Error
Response + HTML5 History API)
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
Serverless Architecture – App Tier
Cognito
Identity
SQS
Lambda
API Gateway
App Tier
Availability Zone A Availability Zone B
Auto Scaling Group
app
servers
app
servers
Cognito
Identity
SQS
Lambda
API Gateway
App Tier
• Accelerated Backend
• Write node.js functions and load
into Lambda
• Power up Lambda with RESTful
endpoints on API Gateway
• Cache, throttle, meter, version,
etc.
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
Serverless Architecture – App Tier
• Accelerated Backend
• Write node.js functions and load
into Lambda
• Power up Lambda with RESTful
endpoints on API Gateway
• Cache, throttle, meter, version,
etc.
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
Serverless Architecture – App Tier
Cognito
Identity
SQS
Lambda
API Gateway
App Tier
Availability Zone A Availability Zone B
Serverless Architecture – DB Tier
DB Tier
SQS DynamoDB
RDS Aurora
DB Tier
SQS DynamoDB
RDS Aurora
Serverless Architecture – DB Tier
• First choice – DynamoDB + SQS
• Schema-free
• Scale only reads and writes
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
• Next choice – RDS Aurora
• Relational
• MySQL-like approach, but 5x better
Serverless Architecture – DB Tier
• First choice – DynamoDB + SQS
• Schema-free
• Scale only reads and writes
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
• Next choice – RDS Aurora
• Relational
• MySQL-like approach, but 5x better
DB Tier
SQS DynamoDB
RDS Aurora
Serverless Architecture – DB Tier
• First choice – DynamoDB + SQS
• Schema-free
• Scale only reads and writes
• Completely Serverless
• Pre-scaled
• Low-cost
• Low-maintenance
• Next choice – RDS Aurora
• Relational
• MySQL-like approach, but 5x better
DB Tier
SQS DynamoDB
RDS Aurora
Lessons Learned
• Serverless approach is challengingly awesome
• Frontend is restricted to JS (and JS Frameworks)
• Backend is restricted to Python, Java or JS (for now)
• SOA and APIs are required by design
Lessons Learned
• Serverless approach is challengingly awesome
• Frontend is restricted to JS (and JS Frameworks)
• Backend is restricted to Python, Java or JS (for now)
• SOA and APIs are required by design
• Services must be as small as possible
• AWS Lambda constrains
• Browser limitations (on mobile devices)
Lessons Learned
• Serverless approach is challengingly awesome
• Frontend is restricted to JS (and JS Frameworks)
• Backend is restricted to Python, Java or JS (for now)
• SOA and APIs are required by design
• Services must be as small as possible => microservices
• AWS Lambda constrains
• Browser limitations (on mobile devices)
Google Trends: Microservices
What does “microservices” mean?
In computing, microservices is a software
architecture style in which complex applications
are composed of small, independent processes
communicating with each other using language-
agnostic APIs. These services are small, highly
decoupled and focus on doing a small task,
facilitating a modular approach to system-
building.
https://en.wikipedia.org/wiki/Microservices
Agenda
• Reference Architecture
• Serverless Microservices
• Demo: todo.deep.mg
• Q&A
Demo: todo.deep.mg
• Inspired from open source
• www.todomvc.com
• Go to the GitHub repository
• github.com/MitocGroup/deep
-microservices-todomvc
• Follow the steps from Getting
Started to build and deploy
• todo.deep.mg
Agenda
• Reference Architecture
• Serverless Microservices
• Demo: todo.deep.mg
• Q&A
Q&A + Next Steps
github.com/MitocGroup blog.mitocgroup.com
beta@deep.mg
www.deep.mg
Thanks:
Willy & Forest from Open Camps
Hosting team from United Nations
http://angular.camp
Credits and Thanks
• Slide 19: AWS re:Invent 2014
• https://venturebeat.com/wp-content/uploads/2014/11/aws-reinvent-lambda.png
• Slide 20: AWS Summit NY 2015
• https://d0.awsstatic.com/events/aws-hosted-events/2015/AWS-Global-Summit-Series/new-york/press-room/introducing-amazon-api-
gateway.jpg

More Related Content

What's hot (9)

PPTX
Microservices Architecture for Digital Platforms using Serverless AWS
Mitoc Group
 
PPTX
Microservices Architecture for Web Applications using Serverless Computing wi...
Mitoc Group
 
PPTX
Microservices Architecture for MEAN Applications using Serverless AWS
Mitoc Group
 
PPTX
Microservices Architecture for Web Applications using Amazon AWS Cloud
Mitoc Group
 
PPTX
ARC201 Microservices Architecture @ AWS re:Invent 2015
Mitoc Group
 
PDF
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Boaz Ziniman
 
PPTX
Microservices Architecture for Web Applications using AWS Lambda and more
Mitoc Group
 
PPTX
Devops on AWS
AWS Riyadh User Group
 
PPTX
AWS Lambda support for AWS X-Ray
Eitan Sela
 
Microservices Architecture for Digital Platforms using Serverless AWS
Mitoc Group
 
Microservices Architecture for Web Applications using Serverless Computing wi...
Mitoc Group
 
Microservices Architecture for MEAN Applications using Serverless AWS
Mitoc Group
 
Microservices Architecture for Web Applications using Amazon AWS Cloud
Mitoc Group
 
ARC201 Microservices Architecture @ AWS re:Invent 2015
Mitoc Group
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Boaz Ziniman
 
Microservices Architecture for Web Applications using AWS Lambda and more
Mitoc Group
 
Devops on AWS
AWS Riyadh User Group
 
AWS Lambda support for AWS X-Ray
Eitan Sela
 

Similar to Serverless Microservices - Real life story of a Web App that uses AngularJS, AWS Lambda and more (20)

PPTX
Microservices Architecture for Content Management Systems using AWS Lambda an...
Mitoc Group
 
PDF
Microservices and serverless for MegaStartups - DLD TLV 2017
Boaz Ziniman
 
PDF
Jumpstart your idea with AWS Serverless [Oct 2020]
Dhaval Nagar
 
PPTX
Serverless applications
mbaric
 
PDF
Microservices Manchester: Serverless Architectures By Rafal Gancarz
OpenCredo
 
PPT
Cloud computing by amazon
8neutron8
 
PDF
CloudCamp Athens presentation: Introduction to cloud computing
Fotis Stamatelopoulos
 
PPTX
AWS basics
mbaric
 
PDF
AWS Summit Atlanta Keynote
Kristana Kane
 
PPT
Cloud computing skepticism - But i'm sure
Nguyen Duong
 
PDF
Crio.do - Deployment on AWS Masterclass
Dhaval Nagar
 
PDF
Serverless Applications on AWS
Dean Bryen
 
PDF
Dhaval Nagar - ServerlessDays Bengaluru 2023
Dhaval Nagar
 
PDF
Serverless Days Ahmedabad - Dhaval Nagar.pptx.pdf
Dhaval Nagar
 
PPTX
Serverless Toronto helps Startups
Daniel Zivkovic
 
PDF
Reimagine Application Modernization with Serverless Architecture
Opteamix LLC
 
PPTX
What is Serverless Computing?
AIMDek Technologies
 
PDF
Serverless meetup
marcel panse
 
PPTX
Cloud Spotting 2017: An overview of cloud computing
Patrice Kerremans
 
PDF
Como construir suas aplicações escaláveis sem servidores
Alexandre Santos
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Mitoc Group
 
Microservices and serverless for MegaStartups - DLD TLV 2017
Boaz Ziniman
 
Jumpstart your idea with AWS Serverless [Oct 2020]
Dhaval Nagar
 
Serverless applications
mbaric
 
Microservices Manchester: Serverless Architectures By Rafal Gancarz
OpenCredo
 
Cloud computing by amazon
8neutron8
 
CloudCamp Athens presentation: Introduction to cloud computing
Fotis Stamatelopoulos
 
AWS basics
mbaric
 
AWS Summit Atlanta Keynote
Kristana Kane
 
Cloud computing skepticism - But i'm sure
Nguyen Duong
 
Crio.do - Deployment on AWS Masterclass
Dhaval Nagar
 
Serverless Applications on AWS
Dean Bryen
 
Dhaval Nagar - ServerlessDays Bengaluru 2023
Dhaval Nagar
 
Serverless Days Ahmedabad - Dhaval Nagar.pptx.pdf
Dhaval Nagar
 
Serverless Toronto helps Startups
Daniel Zivkovic
 
Reimagine Application Modernization with Serverless Architecture
Opteamix LLC
 
What is Serverless Computing?
AIMDek Technologies
 
Serverless meetup
marcel panse
 
Cloud Spotting 2017: An overview of cloud computing
Patrice Kerremans
 
Como construir suas aplicações escaláveis sem servidores
Alexandre Santos
 
Ad

Recently uploaded (20)

PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Ad

Serverless Microservices - Real life story of a Web App that uses AngularJS, AWS Lambda and more

  • 1. Serverless Microservices Real life story of a Web App that uses AngularJS, AWS Lambda and more Eugene Istrati, Technology Partner [email protected] www.mitocgroup.com http://angular.camp
  • 2. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Eugen Istrati, Partner @ Mitoc Group Microservices Architecture for Digital Platforms with AWS Lambda, Amazon CloudFront, and Amazon DynamoDB [email protected] October 2015 ARC201
  • 3. About Eugene Istrati • [email protected] Partner @ Mitoc Group Inc • 15+ years in IT; 7+ years on AWS • AWS Certified Solutions Architect • Companies: Hearst, Amazon, GrubHub, Tenaris (Europe) Mitoc Group Inc • www.mitocgroup.com • Technology Company focusing on Innovative Enterprise Solutions • AWS Technology Partner • Featured AWS Lambda Partner • Media and Entertainment Industry
  • 4. Agenda • Reference Architecture • Serverless Microservices • Demo: todo.deep.mg • Q&A
  • 5. Demo: todo.deep.mg • Inspired from open source • www.todomvc.com • Go to the GitHub repository • github.com/MitocGroup/deep -microservices-todomvc • Follow the steps from Getting Started to build and deploy • todo.deep.com
  • 6. Agenda • Reference Architecture • Serverless Microservices • Demo: todo.deep.mg • Q&A
  • 7. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes
  • 8. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks
  • 9. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity
  • 10. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity • Requires DevOps with experience
  • 11. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity • Requires DevOps with experience • Flexible choice of technology
  • 12. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity • Requires DevOps with experience • Flexible choice of technology • Requires devs with rich skill set
  • 13. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity • Requires DevOps with experience • Flexible choice of technology • Requires devs with rich skill set • Cost-effective
  • 14. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity • Requires DevOps with experience • Flexible choice of technology • Requires devs with rich skill set • Cost-effective • Over-provisioning and over-paying
  • 15. Reference Architecture Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers • Scales in minutes • Huge challenge for breaking news, viral content, or attacks • Reduced operational complexity • Requires DevOps with experience • Flexible choice of technology • Requires devs with rich skill set • Cost-effective • Over-provisioning and over-paying
  • 16. AWS re:Invent 2014 Note: Credits and thanks are listed at the end of the presentation
  • 17. AWS Summit NY 2015 Note: Credits and thanks are listed at the end of the presentation
  • 18. Reference Architecture … Reinvented Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers S3 bucket CloudFront distribution Web Tier Cognito Identity DB Tier SQS DynamoDB LambdaCloudFront logs API Gateway www.example.com static.example.com App Tier AWS Region RDS Aurora
  • 19. Agenda • Reference Architecture • Serverless Microservices • Demo: todo.deep.mg • Q&A
  • 20. What does “serverless” mean? Not involving a server; composed only of clients. http://www.wordsense.eu/serverless Serverless doesn’t mean servers are no longer involved. It simply means that developers no longer have to think "that much" about them. Computing resources get used as services without having to manage around physical capacities or limits. https://www.quora.com/What-is-Serverless-Computing
  • 21. Serverless vs. Reference Availability Zone A Availability Zone B Auto Scaling Group Auto Scaling Group www.example.com static.example.com web servers web servers app servers app servers S3 bucket CloudFront distribution Web Tier Cognito Identity DB Tier SQS DynamoDB LambdaCloudFront logs API Gateway www.example.com static.example.com App Tier AWS Region RDS Aurora vs
  • 22. Serverless Architecture – Web Tier S3 bucket CloudFront distribution Web Tier Cognito Identity CloudFront logs www.example.com static.example.com Availability Zone A Availability Zone B Auto Scaling Group www.example.com static.example.com web servers web servers
  • 23. Serverless Architecture – Web Tier S3 bucket CloudFront distribution Web Tier Cognito Identity CloudFront logs www.example.com static.example.com • Static Assets • Same as in reference architecture • css, js, docs, images, videos + html • Dynamic Functionality • Use JS framework (e.g. Angular) • SEO-friendly (Custom Error Response + HTML5 History API) • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance
  • 24. Serverless Architecture – Web Tier S3 bucket CloudFront distribution Web Tier Cognito Identity CloudFront logs www.example.com static.example.com • Static Assets • Same as in reference architecture • css, js, docs, images, videos + html • Dynamic Functionality • Use JS framework (e.g. Angular) • SEO-friendly (Custom Error Response + HTML5 History API) • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance
  • 25. Serverless Architecture – Web Tier S3 bucket CloudFront distribution Web Tier Cognito Identity CloudFront logs www.example.com static.example.com • Static Assets • Same as in reference architecture • css, js, docs, images, videos + html • Dynamic Functionality • Use JS framework (e.g. Angular) • SEO-friendly (Custom Error Response + HTML5 History API) • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance
  • 26. Serverless Architecture – App Tier Cognito Identity SQS Lambda API Gateway App Tier Availability Zone A Availability Zone B Auto Scaling Group app servers app servers
  • 27. Cognito Identity SQS Lambda API Gateway App Tier • Accelerated Backend • Write node.js functions and load into Lambda • Power up Lambda with RESTful endpoints on API Gateway • Cache, throttle, meter, version, etc. • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance Serverless Architecture – App Tier
  • 28. • Accelerated Backend • Write node.js functions and load into Lambda • Power up Lambda with RESTful endpoints on API Gateway • Cache, throttle, meter, version, etc. • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance Serverless Architecture – App Tier Cognito Identity SQS Lambda API Gateway App Tier
  • 29. Availability Zone A Availability Zone B Serverless Architecture – DB Tier DB Tier SQS DynamoDB RDS Aurora
  • 30. DB Tier SQS DynamoDB RDS Aurora Serverless Architecture – DB Tier • First choice – DynamoDB + SQS • Schema-free • Scale only reads and writes • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance • Next choice – RDS Aurora • Relational • MySQL-like approach, but 5x better
  • 31. Serverless Architecture – DB Tier • First choice – DynamoDB + SQS • Schema-free • Scale only reads and writes • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance • Next choice – RDS Aurora • Relational • MySQL-like approach, but 5x better DB Tier SQS DynamoDB RDS Aurora
  • 32. Serverless Architecture – DB Tier • First choice – DynamoDB + SQS • Schema-free • Scale only reads and writes • Completely Serverless • Pre-scaled • Low-cost • Low-maintenance • Next choice – RDS Aurora • Relational • MySQL-like approach, but 5x better DB Tier SQS DynamoDB RDS Aurora
  • 33. Lessons Learned • Serverless approach is challengingly awesome • Frontend is restricted to JS (and JS Frameworks) • Backend is restricted to Python, Java or JS (for now) • SOA and APIs are required by design
  • 34. Lessons Learned • Serverless approach is challengingly awesome • Frontend is restricted to JS (and JS Frameworks) • Backend is restricted to Python, Java or JS (for now) • SOA and APIs are required by design • Services must be as small as possible • AWS Lambda constrains • Browser limitations (on mobile devices)
  • 35. Lessons Learned • Serverless approach is challengingly awesome • Frontend is restricted to JS (and JS Frameworks) • Backend is restricted to Python, Java or JS (for now) • SOA and APIs are required by design • Services must be as small as possible => microservices • AWS Lambda constrains • Browser limitations (on mobile devices)
  • 37. What does “microservices” mean? In computing, microservices is a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language- agnostic APIs. These services are small, highly decoupled and focus on doing a small task, facilitating a modular approach to system- building. https://en.wikipedia.org/wiki/Microservices
  • 38. Agenda • Reference Architecture • Serverless Microservices • Demo: todo.deep.mg • Q&A
  • 39. Demo: todo.deep.mg • Inspired from open source • www.todomvc.com • Go to the GitHub repository • github.com/MitocGroup/deep -microservices-todomvc • Follow the steps from Getting Started to build and deploy • todo.deep.mg
  • 40. Agenda • Reference Architecture • Serverless Microservices • Demo: todo.deep.mg • Q&A
  • 41. Q&A + Next Steps github.com/MitocGroup blog.mitocgroup.com [email protected] www.deep.mg Thanks: Willy & Forest from Open Camps Hosting team from United Nations http://angular.camp
  • 42. Credits and Thanks • Slide 19: AWS re:Invent 2014 • https://venturebeat.com/wp-content/uploads/2014/11/aws-reinvent-lambda.png • Slide 20: AWS Summit NY 2015 • https://d0.awsstatic.com/events/aws-hosted-events/2015/AWS-Global-Summit-Series/new-york/press-room/introducing-amazon-api- gateway.jpg

Editor's Notes

  • #2: Hello everybody and welcome! Thank you for taking the time to attend this session. I feel very humble and honored to be here today to talk about Serverless Microservices.
  • #3: This presentation has emerged and evolved over time from our breakout session at AWS re:Invent conference back in October 2015.
  • #4: My name is Eugene Istrati. I’m the Technology Partner at Mitoc Group. This slide describes a little bit about myself and my company, which is very relevant and important to emphasize the experience, but I won’t spend too much time here.
  • #5: My presentation today is focused around 3 major concepts: serverless infrastructure, microservices architecture and sample web application with a hands-on demo.
  • #6: My goal today is to show you hands on the value of serverless microservices. At the end of this presentation, I will demo some steps from our development process, based on the code that currently runs on todo.deep.mg. Because the initial provisioning takes some time, I’ve launched everything before this webinar, to make sure we don’t spend time waiting.
  • #7: Let’s begin.
  • #8: Most of us are using this reference architecture for web applications. In a nutshell, the infrastructure spreads across multiple availability zones, which means it is running in separate physical datacenters that are millisecond latency apart from each other. Therefore it is no surprise that this architecture scales in minutes.
  • #9: But if you have experienced before breaking news, or viral content, or various attacks on your web application, you know that scaling in minutes is just not enough. We had to build by ourselves additional complexity to scale the infrastructure faster and meet the spiking demands.
  • #10: Using this architecture on AWS makes it easier for us to maintain and support. Less operations makes the application less complex.
  • #11: But we still needed experienced devops engineers to do so.
  • #12: As developers, we can choose whatever technology stack we would like to use: Java or C#, Python or Ruby, Scala or Go, JavaScript or JavaScript.
  • #13: But we had to recruit and hire developers with rich skillset, who are able to build and support the entire technology stack.
  • #14: And, of course, this architecture is cost effective, if we implement it properly. We are paying only for resources that we are using.
  • #15: But when the infrastructure doesn’t scale fast enough to meet the demand, our engineering teams are over-provisioning to solve short-term problems and buy time until they figure out long-term solutions.
  • #16: While we were trying to solve these problems for our customers, two major events happened that changed everything.
  • #17: 1. In 2014, at the re:Invent, Amazon launched AWS Lambda, an event-driven computing service for dynamic applications.
  • #18: And 2. Last year, at NY Summit, AWS launched Amazon API Gateway, a fully managed service for scalable API endpoints.
  • #19: These 2 new services enabled us to reinvent the reference architecture in a completely serverless approach.
  • #20: Let’s dive next into serverless microservices.
  • #21: Every SaaS offering is Serverless. But what does serverless mean? Intuitively, there should be something related to “no servers”. And it is. The key concept is that customers don’t need to deal with servers and all associated operations to keep them up and running at scale. Instead, we are getting abstracted services that are highly secure and highly available, pre-provisioned and pre-scaled.
  • #22: So, the main question is: How can we get to this serverless architecture? Let me show you how we transformed our customers applications running on reference architecture, explained layer by layer.
  • #23: First question, how can we transform the web tier into a serverless one? Most of us think of S3 as a storage service available over the Internet. We think of S3 as a cluster of web servers behind load balancers that have turned off server side scripting modules. It is secured through IAM and there is no need to worry about underlying infrastructure.
  • #24: As we are doing this transformation, the static component stays exactly the same as in reference architecture. We load everything into S3: css, javascript, documents, images, videos. And even html, which usually is served by EC2.
  • #25: Because S3 doesn’t allow server side scripting, we use client side languages like JavaScript to add dynamic functionality. Modern JavaScript frameworks like AngularJS caught up a lot lately to other popular web frameworks. They provide similar patterns and best practices like Symfony, or Django, or Rails. And they are very friendly with search engines, allowing indexing of both new applications and legacy applications.
  • #26: But the biggest benefit – it is completely serverless. The infrastructure comes pre-scaled at AWS size, which is virtually infinite. I have heard some people saying quote: “You will reach your budget faster than AWS will reach its physical limits”. And the bigger it is, the better it gets and the lower it costs.
  • #27: Now let’s see how we transformed our app tier into a serverless one. AWS Lambda can roughly be described as a docker container on steroids. It deploys code in milliseconds and executes code in seconds. Like in case of web tier, it is secured through IAM and there is no need to worry about underlying infrastructure.
  • #28: Because of the way Lambda is designed, we get out of the box an accelerated backend that has short time to live. We are writing small nodejs functions, loading them into Lambda, and consuming them through API Gateway. It is also possible to call Lambda directly, but then you need to build by yourself caching and throttling, metering and versioning. Why would you do that, when this comes pre-built into API Gateway?
  • #29: And like in case of web tier, it is completely serverless.
  • #30: How do we transform the database tier into a serverless one? We encourage all of us to use DynamoDB because the only operations you care about are reads per second and writes per second. And like in case of both web tier and app tier, it is secured through IAM and there is no need to worry about underlying infrastructure.
  • #31: DynamoDB is an amazing schema-less key-value database like MongoDB. We only increase or decrease, reads or writes, independently from each other. But at scale, by itself, DynamoDB could be cost intensive. We virtually put SQS in front of DynamoDB and store datasets into the queue that later gets asynchronously saved into the database. Apparently, this “eventual consistency” pattern saved AWS customers like Shazam 50% of their database cost.
  • #32: And again, guess what? It is completely serverless.
  • #33: But if you are for some reason coupled to relational databases, you can choose RDS Aurora. It is a MySQL like database, cloud native and scales seamlessly.
  • #34: What did we learn? Well, serverless approach is awesome and has its own challenges. Some developers might find these challenges unpleasant and unwanted. We actually appreciate them a lot because it enabled us to achieve more by doing less. For example, not having alternatives to Services Oriented Architecture and Application Programming Interfaces forced everybody on the team to commit and build SOA and APIs.
  • #35: SOA also means we build services. But a service on AWS Lambda is constrained by design to 300 seconds execution time and 1.5G of memory. Not to mention browsers limitations with responsive design, especially on mobile devices.
  • #36: That is why we have turned to microservices architecture, which I will be talking about next.
  • #37: Microservices architecture is the new trend that makes all of us curious and excited. And 2 years ago, it almost didn’t exist.
  • #38: What does microservices mean? In a nutshell, it’s an architectural pattern that can be applied almost anywhere, either we are talking about infrastructure, or platform, or application. Think of it like a shredder for monoliths, that makes from complex into simple and from difficult into easy. If it’s software driven, it could be designed as microservices.
  • #39: Finally, we are getting to our demo.
  • #40: In this demo, I will achieve the deploy my serverless application to AWS completely automated. I will go to GitHub and follow the steps from README, Getting Started section. After couple of command line executions, I will load in the browser the clone of todo app, that will be running in my own AWS account as a custom web application. Let’s see what happens.
  • #41: And that concludes my presentation and opens up the floor to questions.