SlideShare a Scribd company logo
1 of 42
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

Microservices Architecture for Digital Platforms using Serverless AWS
Microservices Architecture for Digital Platforms using Serverless AWSMicroservices Architecture for Digital Platforms using Serverless AWS
Microservices Architecture for Digital Platforms using Serverless AWSMitoc Group
 
Microservices Architecture for Web Applications using Serverless Computing wi...
Microservices Architecture for Web Applications using Serverless Computing wi...Microservices Architecture for Web Applications using Serverless Computing wi...
Microservices Architecture for Web Applications using Serverless Computing wi...Mitoc Group
 
Microservices Architecture for MEAN Applications using Serverless AWS
Microservices Architecture for MEAN Applications using Serverless AWSMicroservices Architecture for MEAN Applications using Serverless AWS
Microservices Architecture for MEAN Applications using Serverless AWSMitoc Group
 
Microservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Web Applications using Amazon AWS CloudMicroservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Web Applications using Amazon AWS CloudMitoc Group
 
ARC201 Microservices Architecture @ AWS re:Invent 2015
ARC201 Microservices Architecture @ AWS re:Invent 2015ARC201 Microservices Architecture @ AWS re:Invent 2015
ARC201 Microservices Architecture @ AWS re:Invent 2015Mitoc Group
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsAmazon Web Services
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupMicroservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupBoaz Ziniman
 
Microservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and moreMicroservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and moreMitoc Group
 
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryAmazon Web Services
 
AWS Lambda support for AWS X-Ray
AWS Lambda support for AWS X-RayAWS Lambda support for AWS X-Ray
AWS Lambda support for AWS X-RayEitan Sela
 
Systems Operations for Windows Workloads
Systems Operations for Windows WorkloadsSystems Operations for Windows Workloads
Systems Operations for Windows WorkloadsAmazon Web Services
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformAmazon Web Services
 
Running your Windows Enterprise Workloads on AWS - Technical 201
Running your Windows Enterprise Workloads on AWS - Technical 201Running your Windows Enterprise Workloads on AWS - Technical 201
Running your Windows Enterprise Workloads on AWS - Technical 201Amazon Web Services
 
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Amazon Web Services
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Amazon Web Services
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesAmazon Web Services
 
Convert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS LambdaConvert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS LambdaAmazon Web Services
 
Migrating Microsoft Applications to AWS like an Expert
Migrating Microsoft Applications to AWS like an ExpertMigrating Microsoft Applications to AWS like an Expert
Migrating Microsoft Applications to AWS like an ExpertAmazon Web Services
 

What's hot (20)

Microservices Architecture for Digital Platforms using Serverless AWS
Microservices Architecture for Digital Platforms using Serverless AWSMicroservices Architecture for Digital Platforms using Serverless AWS
Microservices Architecture for Digital Platforms using Serverless AWS
 
Microservices Architecture for Web Applications using Serverless Computing wi...
Microservices Architecture for Web Applications using Serverless Computing wi...Microservices Architecture for Web Applications using Serverless Computing wi...
Microservices Architecture for Web Applications using Serverless Computing wi...
 
Microservices Architecture for MEAN Applications using Serverless AWS
Microservices Architecture for MEAN Applications using Serverless AWSMicroservices Architecture for MEAN Applications using Serverless AWS
Microservices Architecture for MEAN Applications using Serverless AWS
 
Serverless architecture
Serverless architectureServerless architecture
Serverless architecture
 
Microservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Web Applications using Amazon AWS CloudMicroservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Web Applications using Amazon AWS Cloud
 
ARC201 Microservices Architecture @ AWS re:Invent 2015
ARC201 Microservices Architecture @ AWS re:Invent 2015ARC201 Microservices Architecture @ AWS re:Invent 2015
ARC201 Microservices Architecture @ AWS re:Invent 2015
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless Applications
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupMicroservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL Meetup
 
Microservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and moreMicroservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and more
 
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
 
Devops on AWS
Devops on AWSDevops on AWS
Devops on AWS
 
AWS Lambda support for AWS X-Ray
AWS Lambda support for AWS X-RayAWS Lambda support for AWS X-Ray
AWS Lambda support for AWS X-Ray
 
Systems Operations for Windows Workloads
Systems Operations for Windows WorkloadsSystems Operations for Windows Workloads
Systems Operations for Windows Workloads
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless Platform
 
Running your Windows Enterprise Workloads on AWS - Technical 201
Running your Windows Enterprise Workloads on AWS - Technical 201Running your Windows Enterprise Workloads on AWS - Technical 201
Running your Windows Enterprise Workloads on AWS - Technical 201
 
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
 
Convert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS LambdaConvert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS Lambda
 
Migrating Microsoft Applications to AWS like an Expert
Migrating Microsoft Applications to AWS like an ExpertMigrating Microsoft Applications to AWS like an Expert
Migrating Microsoft Applications to AWS like an Expert
 

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

How Serverless Computing Enables Microservices and Micropayment 
How Serverless Computing Enables Microservices and Micropayment  How Serverless Computing Enables Microservices and Micropayment 
How Serverless Computing Enables Microservices and Micropayment  Amazon Web Services
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Mitoc Group
 
AWS Startup Day Bangalore: Being Well-Architected in the Cloud
AWS Startup Day Bangalore: Being Well-Architected in the CloudAWS Startup Day Bangalore: Being Well-Architected in the Cloud
AWS Startup Day Bangalore: Being Well-Architected in the CloudAdrian Hornsby
 
Journey Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersJourney Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersAdrian Hornsby
 
Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)Adrian Hornsby
 
Being Well-Architected in the Cloud
Being Well-Architected in the CloudBeing Well-Architected in the Cloud
Being Well-Architected in the CloudAmazon Web Services
 
Dean Bryen: Scaling The Platform For Your Startup
Dean Bryen: Scaling The Platform For Your StartupDean Bryen: Scaling The Platform For Your Startup
Dean Bryen: Scaling The Platform For Your Startuphuguk
 
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupIntroducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupBoaz Ziniman
 
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)Amazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017Amazon Web Services
 
Simplifying Microsoft Architectures with AWS Services
Simplifying Microsoft Architectures with AWS Services Simplifying Microsoft Architectures with AWS Services
Simplifying Microsoft Architectures with AWS Services Amazon Web Services
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBAmazon Web Services
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)Amazon Web Services
 
Building compelling Enterprise Solutions on AWS
Building compelling Enterprise Solutions on AWSBuilding compelling Enterprise Solutions on AWS
Building compelling Enterprise Solutions on AWSAmazon Web Services
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your StartupAmazon Web Services
 

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

How Serverless Computing Enables Microservices and Micropayment 
How Serverless Computing Enables Microservices and Micropayment  How Serverless Computing Enables Microservices and Micropayment 
How Serverless Computing Enables Microservices and Micropayment 
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...
 
AWS Startup Day Bangalore: Being Well-Architected in the Cloud
AWS Startup Day Bangalore: Being Well-Architected in the CloudAWS Startup Day Bangalore: Being Well-Architected in the Cloud
AWS Startup Day Bangalore: Being Well-Architected in the Cloud
 
Journey Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersJourney Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million Users
 
Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)
 
Being Well-Architected in the Cloud
Being Well-Architected in the CloudBeing Well-Architected in the Cloud
Being Well-Architected in the Cloud
 
Dean Bryen: Scaling The Platform For Your Startup
Dean Bryen: Scaling The Platform For Your StartupDean Bryen: Scaling The Platform For Your Startup
Dean Bryen: Scaling The Platform For Your Startup
 
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds MeetupIntroducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
 
Serverless Culture
Serverless CultureServerless Culture
Serverless Culture
 
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
The Best of re:invent 2016
The Best of re:invent 2016The Best of re:invent 2016
The Best of re:invent 2016
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017The State of Serverless Computing | AWS Public Sector Summit 2017
The State of Serverless Computing | AWS Public Sector Summit 2017
 
Best of re:Invent
Best of re:InventBest of re:Invent
Best of re:Invent
 
Simplifying Microsoft Architectures with AWS Services
Simplifying Microsoft Architectures with AWS Services Simplifying Microsoft Architectures with AWS Services
Simplifying Microsoft Architectures with AWS Services
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDB
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
 
Building compelling Enterprise Solutions on AWS
Building compelling Enterprise Solutions on AWSBuilding compelling Enterprise Solutions on AWS
Building compelling Enterprise Solutions on AWS
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
 

Recently uploaded

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 

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 eugene@mitocgroup.com 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 eugen@mitocgroup.com October 2015 ARC201
  • 3. 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
  • 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 beta@deep.mg 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

  1. 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.
  2. This presentation has emerged and evolved over time from our breakout session at AWS re:Invent conference back in October 2015.
  3. 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.
  4. My presentation today is focused around 3 major concepts: serverless infrastructure, microservices architecture and sample web application with a hands-on demo.
  5. 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.
  6. Let’s begin.
  7. 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.
  8. 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.
  9. Using this architecture on AWS makes it easier for us to maintain and support. Less operations makes the application less complex.
  10. But we still needed experienced devops engineers to do so.
  11. 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.
  12. But we had to recruit and hire developers with rich skillset, who are able to build and support the entire technology stack.
  13. And, of course, this architecture is cost effective, if we implement it properly. We are paying only for resources that we are using.
  14. 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.
  15. While we were trying to solve these problems for our customers, two major events happened that changed everything.
  16. 1. In 2014, at the re:Invent, Amazon launched AWS Lambda, an event-driven computing service for dynamic applications.
  17. And 2. Last year, at NY Summit, AWS launched Amazon API Gateway, a fully managed service for scalable API endpoints.
  18. These 2 new services enabled us to reinvent the reference architecture in a completely serverless approach.
  19. Let’s dive next into serverless microservices.
  20. 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.
  21. 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.
  22. 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.
  23. 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.
  24. 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.
  25. 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.
  26. 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.
  27. 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?
  28. And like in case of web tier, it is completely serverless.
  29. 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.
  30. 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.
  31. And again, guess what? It is completely serverless.
  32. 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.
  33. 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.
  34. 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.
  35. That is why we have turned to microservices architecture, which I will be talking about next.
  36. Microservices architecture is the new trend that makes all of us curious and excited. And 2 years ago, it almost didn’t exist.
  37. 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.
  38. Finally, we are getting to our demo.
  39. 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.
  40. And that concludes my presentation and opens up the floor to questions.