arc201 microservices architecture @ aws re:invent 2015
TRANSCRIPT
![Page 1: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/1.jpg)
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Eugene Istrati, CTO @ Mitoc Group
Microservices Architecturefor Digital Platforms with AWS Lambda,
Amazon CloudFront, and Amazon DynamoDB
October 2015
ARC201
![Page 2: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/2.jpg)
What to Expect from the Session
• Problem. Digital platforms at scale are getting slower, cost-intensive, and vulnerable to various attacks
• Solution. Serverless Platform-as-a-Service on AWS
• Presenter. Why we’re qualified to talk about this topic
• Dive Deep. Technical details, lessons learned, tips and tricks, and hands-on demos
• Success. Enable customers to achieve more by doing less
![Page 3: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/3.jpg)
Digital Platform Challenges
Note: Credits and thanks are listed at the end of the presentation
…
…
…
![Page 4: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/4.jpg)
Average cost of downtime• $500K - $1M / hour (IDC, Dec 2014)• $140K - $540K / hour (Garner, July 2014)• $474K / hour (Ponemon Inst., Dec 2013)
Most commonly reported consequences
• Damage to reputation (38%)• Increase in customer churn (37%)• Damage to credit rating (28%)• Increase to insurance premiums (26%)
Digital Platform Challenges
Outage
Degradation
No impact
0% 10% 20% 30% 40% 50% 60% 70%
27%
60%
13%
Impact of DoS/DDoS Attack
Note: Credits and thanks are listed at the end of the presentation
![Page 5: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/5.jpg)
Digital Enterprise End-to-end Platform on AWS
![Page 6: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/6.jpg)
About
Eugene Istrati
• CTO @ Mitoc Group Inc
• 15+ years in IT; 7+ years on AWS
• AWS Certified Solutions Architect – Associate Level
• Companies: Hearst, Amazon, GrubHub, Tenaris (Europe)
Mitoc Group Inc
• www.mitocgroup.com
• Web Development Studio
• AWS Technology Partner
• Focusing on enterprise applications and platforms
• Working with customers from media and entertainment industry
![Page 7: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/7.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 8: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/8.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• Scales in minutes
![Page 9: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/9.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• Scales in minutes• Huge challenge for breaking
news, viral content, or attacks
![Page 10: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/10.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• Scales in minutes• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity
![Page 11: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/11.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• Scales in minutes• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity• Requires DevOps with experience
![Page 12: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/12.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• Scales in minutes• Huge challenge for breaking
news, viral content, or attacks
• Reduced operational complexity• Requires DevOps with experience
• Flexible choice of technology
![Page 13: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/13.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• 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
![Page 14: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/14.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• 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
![Page 15: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/15.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• 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
![Page 16: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/16.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• 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
![Page 17: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/17.jpg)
AWS re:Invent 2014
Note: Credits and thanks are listed at the end of the presentation
![Page 18: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/18.jpg)
AWS Summit NY 2015
Note: Credits and thanks are listed at the end of the presentation
![Page 19: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/19.jpg)
Web Apps Hosting … Reinvented
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
S3 bucket
CloudFrontdistributio
n
Web Tier
CognitoIdentity DB Tier
SQS DynamoDB
LambdaCloudFrontlogs
API Gateway
www.example.comstatic.example.com
App Tier
AWS Region RDS Aurora
![Page 20: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/20.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 21: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/21.jpg)
Serverless Architecture vs. Reference
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
S3 bucket
CloudFrontdistributio
n
Web Tier
CognitoIdentity DB Tier
SQS DynamoDB
LambdaCloudFrontlogs
API Gateway
www.example.comstatic.example.com
App Tier
AWS Region RDS Aurora
vs
![Page 22: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/22.jpg)
Serverless Architecture – Web Tier
S3 bucket
CloudFrontdistribution
Web Tier
CognitoIdentity
CloudFrontlogs
www.example.comstatic.example.com
Availability Zone A Availability Zone B
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
![Page 23: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/23.jpg)
Serverless Architecture – Web Tier
S3 bucket
CloudFrontdistribution
Web Tier
CognitoIdentity
CloudFrontlogs
www.example.comstatic.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
![Page 24: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/24.jpg)
Serverless Architecture – Web Tier
S3 bucket
CloudFrontdistribution
Web Tier
CognitoIdentity
CloudFrontlogs
www.example.comstatic.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
![Page 25: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/25.jpg)
Serverless Architecture – Web Tier
S3 bucket
CloudFrontdistribution
Web Tier
CognitoIdentity
CloudFrontlogs
www.example.comstatic.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
![Page 26: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/26.jpg)
Serverless Architecture – App Tier
CognitoIdentity
SQS
Lambda
API Gateway
App Tier
Availability Zone A Availability Zone B
Auto Scaling Group
appservers
appservers
![Page 27: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/27.jpg)
CognitoIdentity
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
![Page 28: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/28.jpg)
• 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
CognitoIdentity
SQS
Lambda
API Gateway
App Tier
![Page 29: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/29.jpg)
Availability Zone A Availability Zone B
Serverless Architecture – DB TierDB Tier
SQS DynamoDB
RDS Aurora
![Page 30: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/30.jpg)
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
![Page 31: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/31.jpg)
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
![Page 32: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/32.jpg)
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
![Page 33: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/33.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 34: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/34.jpg)
Demo: Set up Serverless Environment1. Security - Create IAM roles2. Front-end - Create S3 bucket - Enable static website hosting - Add bucket policy - Create CloudFront distribution3. Back-end - Create Lambda function - Upload code into Lambda - Create API Gateway endpoint4. Database - Create DynamoDB table5. Code - Load code into S3 bucket - View via CloudFront (S3 as backup)
S3 bucket
CloudFrontdistribution
Web Tier
CognitoIdentity DB Tier
SQS DynamoDB
LambdaCloudFrontlogs
API Gateway
www.example.comstatic.example.com
App Tier
AWS RegionRDS Aurora
![Page 35: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/35.jpg)
Lessons Learned
• Serverless approach is challengingly awesome
• Frontend is restricted to JS (and JS Frameworks)• Backend is restricted to JS and Java (for now)• SOA and APIs are required by design
![Page 36: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/36.jpg)
Lessons Learned
• Serverless approach is challengingly awesome
• Frontend is restricted to JS (and JS Frameworks)• Backend is restricted to JS and Java (for now)• SOA and APIs are required by design
• Services must be as small as possible
• AWS Lambda constrains• Browser limitations (on mobile devices)
![Page 37: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/37.jpg)
Lessons Learned
• Serverless approach is challengingly awesome
• Frontend is restricted to JS (and JS Frameworks)• Backend is restricted to JS and Java (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)
![Page 38: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/38.jpg)
Let’s Recap
![Page 39: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/39.jpg)
Recap
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• Reference architecture for web application hosting on AWS
![Page 40: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/40.jpg)
Recap• Reference architecture for web
application hosting on AWS
• Transformed to serverless architecture on AWS
S3 bucket
CloudFrontdistributio
n
Web Tier
CognitoIdentity DB Tier
SQS DynamoDB
LambdaCloudFrontlogs
API Gateway
www.example.comstatic.example.com
App Tier
AWS Region RDS Aurora
![Page 41: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/41.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 42: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/42.jpg)
Microservices Architecture
Keynote GOTO Conference: Microservices by Martin Fowler - https://www.youtube.com/watch?v=wgdBVIX9ifA
State of the Art in Microservices - https://www.youtube.com/watch?v=nMTaS07i3jk
InterprocessComms inCloud: Pros,Cons ofMicroservicesArchitectures - https://www.youtube.com/watch?v=CriDUYtfrjs
![Page 43: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/43.jpg)
Speeding Up Digital Platforms on AWS
Deploy in weeksLive for years
Deploy in minutesLive for weeks
Deploy in secondsLive for minutes/hours
Deploy in millisecondsLive for seconds
On-Premises Amazon EC2 Amazon ECS AWS Lambda
![Page 44: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/44.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 45: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/45.jpg)
AWS Lambda in Action
![Page 46: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/46.jpg)
AWS Lambda in Action
• AWS Lambda scaled with no effort for us
• 70M+ invocations / day• 10K+ concurrent invocations / second
![Page 47: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/47.jpg)
Web Apps Hosting / Reference Architecture
Availability Zone A Availability Zone B
Auto Scaling Group
Auto Scaling Group
www.example.com
static.example.com
webservers
webservers
appservers
appservers
• 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
![Page 48: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/48.jpg)
AWS Lambda in Action
• AWS Lambda scaled with no effort for us
• 70M+ invocations / day• 10K+ concurrent invocations / second
• AWS Lambda made it really easy for us
• Comes pre-scaled and charges in 100ms blocks• No under- or over-provisioning (by design)• Developers love it (especially frontend JS folks)• DevOps still in play mode (learning to build ops code)
![Page 49: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/49.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 50: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/50.jpg)
Tips and Tricks
• AWS Lambda is continuously evolving
• Set up alarms for all 4 Lambda metrics in Amazon CloudWatch• Avoid S3 throttling by integrating S3 => SNS => Lambda• Beware of potential infinite loops
![Page 51: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/51.jpg)
Tips and Tricks
• AWS Lambda is continuously evolving
• Set up alarms for all 4 Lambda metrics in Amazon CloudWatch• Avoid S3 throttling by integrating S3 => SNS => Lambda• Beware of potential infinite loops
• Microservices are game changers
• The shorter TTL, the more secure it becomes• First, build a service or a feature• Next, break it down into microservices
![Page 52: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/52.jpg)
Tips and Tricks – Example• Identifying UI and UX needs (frontend)
• Show plans and related data points• Manage credit cards securely• Download payment receipts
• Identifying REST API calls (backend)• Endpoint: /plans => 4 Lambdas for CRUD• Endpoint: /creditcards => 4 Lambdas for CRUD• Endpoint: /payments => 4 Lambdas for CRUD
• Identifying datasets to be stored (database)• Entity: Plans• Entity: CreditCards• Entity: Receipts
![Page 53: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/53.jpg)
Tips and Tricks – Example• Identifying UI and UX needs (frontend)
• Show plans and related data points• Manage credit cards securely• Download payment receipts
• Identifying REST API calls (backend)• Endpoint: /plans => 4 Lambdas for CRUD• Endpoint: /creditcards => 4 Lambdas for CRUD• Endpoint: /payments => 4 Lambdas for CRUD
• Identifying datasets to be stored (database)• Entity: Plans• Entity: CreditCards• Entity: Receipts
![Page 54: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/54.jpg)
Tips and Tricks – Example• Identifying UI and UX needs (frontend)
• Show plans and related data points• Manage credit cards securely• Download payment receipts
• Identifying REST API calls (backend)• Endpoint: /plans => 4 Lambdas for CRUD• Endpoint: /creditcards => 4 Lambdas for CRUD• Endpoint: /payments => 4 Lambdas for CRUD
• Identifying datasets to be stored (database)• Entity: Plans• Entity: CreditCards• Entity: Receipts
![Page 55: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/55.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 56: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/56.jpg)
AWS Products and Services
![Page 57: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/57.jpg)
Digital Enterprise End-to-end Platform
![Page 58: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/58.jpg)
DEEP is using AWS Abstracted Services
![Page 59: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/59.jpg)
DEEP is using Open Source Software
![Page 60: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/60.jpg)
DEEP Framework
![Page 61: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/61.jpg)
DEEP Framework – Open Sourced
https://github.com/MitocGroup/deep-framework
![Page 62: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/62.jpg)
DEEP Microservices
![Page 63: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/63.jpg)
DEEP Microservices – HelloWorld
https://github.com/MitocGroup/deep-microservices-helloworld
![Page 64: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/64.jpg)
DEEP Management
![Page 65: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/65.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 66: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/66.jpg)
Demo: dam.deep.mg
• Create new digital property• www.awsreinvent2015.com
• Publish code from origin• github.com/MitocGroup/aws
reinvent2015.com
• Open newly created website• www.awsreinvent2015.com
www.awsreinvent2015.com
![Page 67: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/67.jpg)
Let’s Recap
![Page 68: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/68.jpg)
Recap• Reference architecture for web
application hosting on AWS
• Transformed to serverless architecture on AWS
• AWS Lambda in action
![Page 69: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/69.jpg)
Recap• Reference architecture for web
application hosting on AWS
• Transformed to serverless architecture on AWS
• AWS Lambda in action
• Tips and tricks with an example
![Page 70: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/70.jpg)
Recap• Reference architecture for web
application hosting on AWS
• Transformed to serverless architecture on AWS
• AWS Lambda in action
• Tips and tricks with an example
• Digital Enterprise End-to-end Platform
![Page 71: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/71.jpg)
Agenda• Web Apps Hosting on AWS
• Reference Architecture• Serverless Architecture• Demo: Set up Serverless Environment
• Microservices Architecture• AWS Lambda in Action• Tips and Tricks• Digital Enterprise End-to-end Platform• Demo: dam.deep.mg
• Q&A + Next Steps
![Page 74: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/74.jpg)
Remember to complete your evaluations!
![Page 75: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/75.jpg)
Credits and Thanks• Slide 3: Digital Platforms Challenges
• http://www.buzzfeed.com/daozers/what-its-like-to-work-on-buzzfeeds-tech-team-during-record-t#.axR6WG9Yr• http://www.dailydot.com/crime/new-york-magazine-ddos-bill-cosby-cover/• http://www.cio.in/topstory/flipkart%E2%80%99s-cto-explains-the-xiaome-launch-outage
• Slide 4: Digital Platforms Challenges• http://www.slideshare.net/Radware/radware-cmg2014-tammyevertsslowtimevsdowntime• http://www.statuscast.com/application-downtime-according-to-idc-gartner-and-others• https://press.kaspersky.com/files/2014/11/B2B-International-2014-Survey-DDoS-Summary-Report.pdf
• Slide 18: AWS re:Invent 2014• https://venturebeat.com/wp-content/uploads/2014/11/aws-reinvent-lambda.png
• Slide 19: 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
• Slide 39: Microservices Architecture• https://www.youtube.com/watch?v=nMTaS07i3jk - State of the Art in Microservices by Adrian Cockcroft• https://www.youtube.com/watch?v=wgdBVIX9ifA - Microservices by Martin Fowler• https://www.youtube.com/watch?v=CriDUYtfrjs - Interprocess Comms in Cloud: Pros, Cons of Microservices Architectures by Sudhir
Tonse
![Page 76: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/76.jpg)
DEEP Value Proposition
![Page 77: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/77.jpg)
DEEP Value Proposition
Customer driven Low cost by default Simplified user experience Developer friendly
![Page 78: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/78.jpg)
DEEP Value Proposition
Customer driven Low cost by default Simplified user experience Developer friendly
![Page 79: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/79.jpg)
DEEP Value Proposition
Customer driven Low cost by default Simplified user experience Developer friendly
![Page 80: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/80.jpg)
DEEP Value Proposition
Customer driven Low cost by default Simplified user experience Developer friendly
![Page 81: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/81.jpg)
DEEP Value Proposition – Examples
CMS (aka Content Management System)
DAM (aka Digital Asset Management)
DMP (aka Data Management Platform)
for image management for video management
for microsite management for content management
for microsite management for data management
![Page 82: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/82.jpg)
DEEP Value Proposition – Examples
CMS (aka Content Management System)
DAM (aka Digital Asset Management)
DMP (aka Data Management Platform)
for image management for video management
for microsite management for content management
for microsite management for data management
![Page 83: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/83.jpg)
DEEP Value Proposition – Examples
CMS (aka Content Management System)
DAM (aka Digital Asset Management)
DMP (aka Data Management Platform)
for image management for video management
for microsite management for content management
for microsite management for data management
![Page 84: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/84.jpg)
DEEP Microservices HelloWorld
![Page 85: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/85.jpg)
DEEP Microservice HelloWorld# Install deepify, DEEP CLI$ npm install deepify –g# Using deepify, create DEEP Microservice HelloWorld$ deepify helloworld ~/Microservices/deep-hello-world# Run DEEP Microservice HelloWorld locally$ deepify server ~/Microservices/deep-hello-world -o# Deploy DEEP Microservice HelloWorld to AWS$ deepify deploy ~/Microservices/deep-hello-world
![Page 86: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/86.jpg)
DEEP Microservice HelloWorld# Install deepify, DEEP CLI$ npm install deepify -g# Using deepify, create DEEP Microservice HelloWorld$ deepify helloworld ~/Microservices/deep-hello-world# Run DEEP Microservice HelloWorld locally$ deepify server ~/Microservices/deep-hello-world -o# Deploy DEEP Microservice HelloWorld to AWS$ deepify deploy ~/Microservices/deep-hello-world
![Page 87: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/87.jpg)
DEEP Microservice HelloWorld# Install deepify, DEEP CLI$ npm install deepify -g# Using deepify, create DEEP Microservice HelloWorld$ deepify helloworld ~/Microservices/deep-hello-world# Run DEEP Microservice HelloWorld locally$ deepify server ~/Microservices/deep-hello-world –o# Deploy DEEP Microservice HelloWorld to AWS$ deepify deploy ~/Microservices/deep-hello-world
![Page 88: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/88.jpg)
DEEP Microservice HelloWorld# Install deepify, DEEP CLI$ npm install deepify -g# Using deepify, create DEEP Microservice HelloWorld$ deepify helloworld ~/Microservices/deep-hello-world# Run DEEP Microservice HelloWorld locally$ deepify server ~/Microservices/deep-hello-world -o# Deploy DEEP Microservice HelloWorld to AWS$ deepify deploy ~/Microservices/deep-hello-world
![Page 89: ARC201 Microservices Architecture @ AWS re:Invent 2015](https://reader036.vdocuments.mx/reader036/viewer/2022062310/58f09be81a28ab71138b457d/html5/thumbnails/89.jpg)
DEEP Microservices Structure• Frontend /• Backend /• Models /
• [ModelName].json
• Docs /• index.md
• Tests /• deepkg.json• parameters.json
• Frontend /• bootstrap.js• index.html• images /• css /• js /
• Backend /• resources.json• src /
• [MicroserviceName] /– package.json– bootstrap.js– Handler.js