SlideShare une entreprise Scribd logo
1  sur  40
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Adrian Hornsby, Technical Evangelist @ AWS
Twitter: @adhorn
10 Lessons from 10 years of AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A bit about me
Technical Evangelist, Developer Advocate,
… Software Engineer
My home is in Finland
Previously:
• Solutions Architect @AWS
• Lead Cloud Architect, Backend developer, … @Dreambroker
• Director of Engineering, Software Engineer, DevOps, ... @Hdm
• Researcher @Nokia Research Center
• and a bunch of other stuff.
Love climbing and ginger shots.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why 10 lessons?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EMBRACE FAILURE
1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
“It is not failure itself that holds you
back; it is the fear of failure that
paralyzes you.”
Brian Tracy
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
"organizations which design systems ... are
constrained to produce designs which are
copies of the communication structures of
these organizations."
M. Conway
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
LOCAL STATE IS A CLOUD ANTI-PATTERN
2
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transient state
do not belong in
the database.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
IMMUTABLE INFRASTRUCTURE
3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Immutable components are replaced for
every deployment, rather than being
updated in-place.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Immutable Infrastructure
• No updates on live systems
• Always start from a new instance being provisioned
• Deploy the new software
• Test in different environments (dev, staging)
• Deploy to prod (inactive)
• Change references (DNS or Load Balancer)
• Keep old version around (inactive)
• Fast rollback if things go wrong
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
INFRASTRUCTURE AS CODE
4
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infrastructure as Code
• Template of the infrastructure in code.
• Version controlled infrastructure.
• Repeatable template.
• Testable infrastructure.
• Automate it!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ASYNCHRONOUS AND EVENT-DRIVEN PATTERNS
WILL HELP YOU SCALE
5
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Message passing for async. patterns
A
Queue
B
A
Queue
BListener
Pub-Sub
SNS, SQS, Redis, RabbitMQ
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Async. Architecture (part 1)
Web
Instances
Worker
Instance
Worker
Instance
Queue
API
Instance
API
Instance
API
Instance
API: {DO foo}
PUT JOB: {JobID: 0001, Task: DO foo}
API: {JobID: 0001}
GET JOB: {JobID: 0001, Task: DO foo}
ElastiCache
Result:
{
JobID: 0001,
Result: bar
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Async. Architecture (part 2)
Worker
Instance
Worker
Instance
Queue
API
Instance
API
Instance
API
Instance
ElastiCache
Amazon SNS
Push Notification
User
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RDS DB Instance
Active (Multi-AZ)
Availability Zone
Elastic Load
Balancer
Web
Instance
Web
Instance
Amazon
Route 53User
Amazon S3
Amazon
Cloudfront
ElastiCache
Worker
Instance
Worker
Instance
Decoupling
Queue Amazon SNS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event driven pattern
A B CEvent on B by A triggers C
Invocation
Lambda functions
Action
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How Lambda works
S3 event
notifications
DynamoDB
Streams
Kinesis
events
Cognito
events
SNS
events
Custom
events
CloudTrail
events
LambdaDynamoDB
Kinesis S3
Any custom
Invoked in response to events
- Changes in data
- Changes in state
Redshift
SNS
Access any service,
including your own
Such as…
Lambda functions
CloudWatch
events
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event-driven using Lambda
AWS Lambda:
Resize Images
Users upload photos
S3:
Source Bucket
S3:
Destination Bucket
Triggered on
PUTs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DON’T FORGET TO SCALE THE DATABASE
(SHARDING TO THE RESCUE)
6
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Read / Write Sharding
RDS DB Instance
Read Replica
App
Instance
App
Instance
App
Instance
RDS DB Instance
Master (Multi-AZ)
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Federation
Users
DB
Products
DB
App
Instance
App
Instance
App
Instance
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Sharding
User ShardID
002345 A
002346 B
002347 C
002348 B
002349 A
CBA
App
Instance
App
Instance
App
Instance
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MEASURE, MEASURE, AND MEASURE
7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Measure __everything__
• Nurture a culture of measuring everything.
• Make it easy to measure.
• Setup alarms and escalation paths.
• Learn and work to automate responses.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DynamoDB at Amazon
“A deep dive on how we were using our existing
databases revealed that they were frequently not used
for their relational capabilities. About 70 percent of
operations were of the key-value kind, where only a
primary key was used and a single row would be returned.
About 20 percent would return a set of rows, but still
operate on only a single table.”
Werner Vogels
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Measuring without Operational Targets is often
Useless
• How can you progress if you have no targets?
• Load test
• Set target and make data driven decisions, not hunch
based.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PLAN FOR THE WORST, PREPARE FOR THE
UNEXPECTED
8
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The best way to know if you
are resilient to failure is to
TEST failures.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
YOU BUILD IT, YOU RUN IT!
9
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BE HUMBLE,
LEARN FROM OTHERS, MAKE HISTORY
10
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
https://medium.com/@NetflixTechBlog
https://engineering.instagram.com/
http://www.allthingsdistributed.com/
http://highscalability.com/
https://segment.com/blog/categories/engineering/
https://reinvent.awsevents.com/
https://www.meetup.com/topics/amazon-web-services/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RECAP
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1. EMBRACE FAILURE
2. LOCAL STATE IS A CLOUD ANTI-PATTERN
3. IMMUTABLE INFRASTRUCTURE
4. INFRASTRUCTURE AS CODE
5. ASYNCHRONOUS AND EVENT-DRIVEN PATTERNS WILL HELP
YOU SCALE
6. DON’T FORGET TO SCALE THE DATABASE (SHARDING TO
THE RESCUE)
7. MEASURE, MEASURE, AND MEASURE
8. PLAN FOR THE WORST, PREPARE FOR THE UNEXPECTED
9. YOU BUILD IT, YOU RUN IT!
10.LEARN FROM OTHERS.
10 Lessons from 10 Years of AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
Questions?
Twitter: @adhorn

Contenu connexe

Tendances

Tendances (20)

Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
AI: State of the Union
AI: State of the UnionAI: State of the Union
AI: State of the Union
 
NEW LAUNCH! Introducing Amazon Sumerian – Build VR/AR and 3D Applications - M...
NEW LAUNCH! Introducing Amazon Sumerian – Build VR/AR and 3D Applications - M...NEW LAUNCH! Introducing Amazon Sumerian – Build VR/AR and 3D Applications - M...
NEW LAUNCH! Introducing Amazon Sumerian – Build VR/AR and 3D Applications - M...
 
Women in Big Data
Women in Big DataWomen in Big Data
Women in Big Data
 
MCL206-Creating Next Generation Speech-Enabled Applications with Amazon Polly
MCL206-Creating Next Generation Speech-Enabled Applications with Amazon PollyMCL206-Creating Next Generation Speech-Enabled Applications with Amazon Polly
MCL206-Creating Next Generation Speech-Enabled Applications with Amazon Polly
 
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
Patterns and Considerations in Service Discovery - Con327 - re:Invent 2017
 
Alexa State of the Science - ALX321 - 2h amazonwebservices Deep Dive into Ama...
Alexa State of the Science - ALX321 - 2h amazonwebservices Deep Dive into Ama...Alexa State of the Science - ALX321 - 2h amazonwebservices Deep Dive into Ama...
Alexa State of the Science - ALX321 - 2h amazonwebservices Deep Dive into Ama...
 
Tracking and Optimizing Ad Monetization for Your Mobile App - MBL307 - re:Inv...
Tracking and Optimizing Ad Monetization for Your Mobile App - MBL307 - re:Inv...Tracking and Optimizing Ad Monetization for Your Mobile App - MBL307 - re:Inv...
Tracking and Optimizing Ad Monetization for Your Mobile App - MBL307 - re:Inv...
 
ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...
ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...
ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...
 
Bringing Characters to Life with Amazon Polly Text-to-Speech - AWS Online Tec...
Bringing Characters to Life with Amazon Polly Text-to-Speech - AWS Online Tec...Bringing Characters to Life with Amazon Polly Text-to-Speech - AWS Online Tec...
Bringing Characters to Life with Amazon Polly Text-to-Speech - AWS Online Tec...
 
AI State of the Union
AI State of the UnionAI State of the Union
AI State of the Union
 
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@EdgeCTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
ALX401-Advanced Alexa Skill Building Conversation and Memory
ALX401-Advanced Alexa Skill Building Conversation and MemoryALX401-Advanced Alexa Skill Building Conversation and Memory
ALX401-Advanced Alexa Skill Building Conversation and Memory
 
GAM309-Breathe Life into a Mobile Game_NoNotes.pdf
GAM309-Breathe Life into a Mobile Game_NoNotes.pdfGAM309-Breathe Life into a Mobile Game_NoNotes.pdf
GAM309-Breathe Life into a Mobile Game_NoNotes.pdf
 
ATC301-Big Data & Analytics for Manufacturing Operations
ATC301-Big Data & Analytics for Manufacturing OperationsATC301-Big Data & Analytics for Manufacturing Operations
ATC301-Big Data & Analytics for Manufacturing Operations
 
MAE402-Media Intelligence for the Cloud with Amazon AI.pdf
MAE402-Media Intelligence for the Cloud with Amazon AI.pdfMAE402-Media Intelligence for the Cloud with Amazon AI.pdf
MAE402-Media Intelligence for the Cloud with Amazon AI.pdf
 
Building AI-powered Serverless Applications on AWS
Building AI-powered Serverless Applications on AWSBuilding AI-powered Serverless Applications on AWS
Building AI-powered Serverless Applications on AWS
 
Building a Multi-Region, Active-Active Serverless Backends.
Building a Multi-Region, Active-Active Serverless Backends.Building a Multi-Region, Active-Active Serverless Backends.
Building a Multi-Region, Active-Active Serverless Backends.
 
BAP307_Use Amazon Lex to Build a Customer Service Chatbot in Your Amazon Conn...
BAP307_Use Amazon Lex to Build a Customer Service Chatbot in Your Amazon Conn...BAP307_Use Amazon Lex to Build a Customer Service Chatbot in Your Amazon Conn...
BAP307_Use Amazon Lex to Build a Customer Service Chatbot in Your Amazon Conn...
 

Similaire à 10 Lessons from 10 Years of AWS

Similaire à 10 Lessons from 10 Years of AWS (20)

Chaos Engineering: Why Breaking Things Should Be Practised.
Chaos Engineering: Why Breaking Things Should Be Practised.Chaos Engineering: Why Breaking Things Should Be Practised.
Chaos Engineering: Why Breaking Things Should Be Practised.
 
Launch Applications the Amazon Way - AWS Online Tech Talks
Launch Applications the Amazon Way - AWS Online Tech TalksLaunch Applications the Amazon Way - AWS Online Tech Talks
Launch Applications the Amazon Way - AWS Online Tech Talks
 
DEV209 A Field Guide to Monitoring in the Cloud: From Lift and Shift to AWS L...
DEV209 A Field Guide to Monitoring in the Cloud: From Lift and Shift to AWS L...DEV209 A Field Guide to Monitoring in the Cloud: From Lift and Shift to AWS L...
DEV209 A Field Guide to Monitoring in the Cloud: From Lift and Shift to AWS L...
 
Performing Chaos at Netflix Scale - DEV334 - re:Invent 2017
Performing Chaos at Netflix Scale - DEV334 - re:Invent 2017Performing Chaos at Netflix Scale - DEV334 - re:Invent 2017
Performing Chaos at Netflix Scale - DEV334 - re:Invent 2017
 
How serverless helps startups innovate and scale
How serverless helps startups innovate and scaleHow serverless helps startups innovate and scale
How serverless helps startups innovate and scale
 
ARC207 Monitoring Performance of Enterprise Applications on AWS: Understandin...
ARC207 Monitoring Performance of Enterprise Applications on AWS: Understandin...ARC207 Monitoring Performance of Enterprise Applications on AWS: Understandin...
ARC207 Monitoring Performance of Enterprise Applications on AWS: Understandin...
 
遷移到 AWS 雲端旅程的方法與工具
遷移到 AWS 雲端旅程的方法與工具遷移到 AWS 雲端旅程的方法與工具
遷移到 AWS 雲端旅程的方法與工具
 
CON208_Building Microservices on AWS
CON208_Building Microservices on AWSCON208_Building Microservices on AWS
CON208_Building Microservices on AWS
 
Enterprise Innovation? Yes, with AWS Cloud, AI, and IoT - WIN201 - re:Invent ...
Enterprise Innovation? Yes, with AWS Cloud, AI, and IoT - WIN201 - re:Invent ...Enterprise Innovation? Yes, with AWS Cloud, AI, and IoT - WIN201 - re:Invent ...
Enterprise Innovation? Yes, with AWS Cloud, AI, and IoT - WIN201 - re:Invent ...
 
Use Amazon Rekognition to Build a Facial Recognition System
Use Amazon Rekognition to Build a Facial Recognition SystemUse Amazon Rekognition to Build a Facial Recognition System
Use Amazon Rekognition to Build a Facial Recognition System
 
Testing and Troubleshooting with AWS Device Farm - MBL301 - re:Invent 2017
Testing and Troubleshooting with AWS Device Farm - MBL301 - re:Invent 2017Testing and Troubleshooting with AWS Device Farm - MBL301 - re:Invent 2017
Testing and Troubleshooting with AWS Device Farm - MBL301 - re:Invent 2017
 
Leveraging a Cloud Policy Framework - From Zero to Well Governed - ENT318 - r...
Leveraging a Cloud Policy Framework - From Zero to Well Governed - ENT318 - r...Leveraging a Cloud Policy Framework - From Zero to Well Governed - ENT318 - r...
Leveraging a Cloud Policy Framework - From Zero to Well Governed - ENT318 - r...
 
Keynote - AWSome Day Copenhagen
Keynote - AWSome Day Copenhagen Keynote - AWSome Day Copenhagen
Keynote - AWSome Day Copenhagen
 
AWSome Day - Opening Keynote
AWSome Day - Opening KeynoteAWSome Day - Opening Keynote
AWSome Day - Opening Keynote
 
AWS re:Invent 2017 | CloudHealth Tech Session
AWS re:Invent 2017 |  CloudHealth Tech SessionAWS re:Invent 2017 |  CloudHealth Tech Session
AWS re:Invent 2017 | CloudHealth Tech Session
 
CON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesCON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized Services
 
Technological Accelerants for Organizational Transformation - DVC303 - re:Inv...
Technological Accelerants for Organizational Transformation - DVC303 - re:Inv...Technological Accelerants for Organizational Transformation - DVC303 - re:Inv...
Technological Accelerants for Organizational Transformation - DVC303 - re:Inv...
 
DVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational TransformationDVC303-Technological Accelerants for Organizational Transformation
DVC303-Technological Accelerants for Organizational Transformation
 
FSV305-Optimizing Payments Collections with Containers and Machine Learning
FSV305-Optimizing Payments Collections with Containers and Machine LearningFSV305-Optimizing Payments Collections with Containers and Machine Learning
FSV305-Optimizing Payments Collections with Containers and Machine Learning
 
ARC207_Monitoring Performance of Enterprise Applications on AWS
ARC207_Monitoring Performance of Enterprise Applications on AWSARC207_Monitoring Performance of Enterprise Applications on AWS
ARC207_Monitoring Performance of Enterprise Applications on AWS
 

Plus de Adrian Hornsby

Plus de Adrian Hornsby (17)

How can your business benefit from going serverless?
How can your business benefit from going serverless?How can your business benefit from going serverless?
How can your business benefit from going serverless?
 
Can Automotive be as agile as Unicorns?
Can Automotive be as agile as Unicorns?Can Automotive be as agile as Unicorns?
Can Automotive be as agile as Unicorns?
 
Moving Forward with AI - as presented at the Prosessipäivät 2018
Moving Forward with AI - as presented at the Prosessipäivät 2018Moving Forward with AI - as presented at the Prosessipäivät 2018
Moving Forward with AI - as presented at the Prosessipäivät 2018
 
Chaos Engineering: Why Breaking Things Should Be Practised.
Chaos Engineering: Why Breaking Things Should Be Practised.Chaos Engineering: Why Breaking Things Should Be Practised.
Chaos Engineering: Why Breaking Things Should Be Practised.
 
Model Serving for Deep Learning
Model Serving for Deep LearningModel Serving for Deep Learning
Model Serving for Deep Learning
 
AI in Finance: Moving forward!
AI in Finance: Moving forward!AI in Finance: Moving forward!
AI in Finance: Moving forward!
 
Moving Forward with AI
Moving Forward with AIMoving Forward with AI
Moving Forward with AI
 
re:Invent re:Cap - Big Data & IoT at Any Scale
re:Invent re:Cap - Big Data & IoT at Any Scalere:Invent re:Cap - Big Data & IoT at Any Scale
re:Invent re:Cap - Big Data & IoT at Any Scale
 
Innovations and the Cloud
Innovations and the CloudInnovations and the Cloud
Innovations and the Cloud
 
Innovations fueled by IoT and the Cloud
Innovations fueled by IoT and the CloudInnovations fueled by IoT and the Cloud
Innovations fueled by IoT and the Cloud
 
AWS Batch: Simplifying batch computing in the cloud
AWS Batch: Simplifying batch computing in the cloudAWS Batch: Simplifying batch computing in the cloud
AWS Batch: Simplifying batch computing in the cloud
 
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)
 
Deep Dive on Object Storage: Amazon S3 and Amazon Glacier
Deep Dive on Object Storage: Amazon S3 and Amazon GlacierDeep Dive on Object Storage: Amazon S3 and Amazon Glacier
Deep Dive on Object Storage: Amazon S3 and Amazon Glacier
 
Serverless Streaming Data Processing using Amazon Kinesis Analytics
Serverless Streaming Data Processing using Amazon Kinesis AnalyticsServerless Streaming Data Processing using Amazon Kinesis Analytics
Serverless Streaming Data Processing using Amazon Kinesis Analytics
 
Introduction to Real-time, Streaming Data and Amazon Kinesis. Streaming Data ...
Introduction to Real-time, Streaming Data and Amazon Kinesis. Streaming Data ...Introduction to Real-time, Streaming Data and Amazon Kinesis. Streaming Data ...
Introduction to Real-time, Streaming Data and Amazon Kinesis. Streaming Data ...
 
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
 
Deep Dive on Amazon S3
Deep Dive on Amazon S3Deep Dive on Amazon S3
Deep Dive on Amazon S3
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

10 Lessons from 10 Years of AWS

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Adrian Hornsby, Technical Evangelist @ AWS Twitter: @adhorn 10 Lessons from 10 years of AWS
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A bit about me Technical Evangelist, Developer Advocate, … Software Engineer My home is in Finland Previously: • Solutions Architect @AWS • Lead Cloud Architect, Backend developer, … @Dreambroker • Director of Engineering, Software Engineer, DevOps, ... @Hdm • Researcher @Nokia Research Center • and a bunch of other stuff. Love climbing and ginger shots.
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Why 10 lessons?
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EMBRACE FAILURE 1
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. “It is not failure itself that holds you back; it is the fear of failure that paralyzes you.” Brian Tracy
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. "organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations." M. Conway
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LOCAL STATE IS A CLOUD ANTI-PATTERN 2
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transient state do not belong in the database.
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. IMMUTABLE INFRASTRUCTURE 3
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Immutable components are replaced for every deployment, rather than being updated in-place.
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Immutable Infrastructure • No updates on live systems • Always start from a new instance being provisioned • Deploy the new software • Test in different environments (dev, staging) • Deploy to prod (inactive) • Change references (DNS or Load Balancer) • Keep old version around (inactive) • Fast rollback if things go wrong
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. INFRASTRUCTURE AS CODE 4
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Infrastructure as Code • Template of the infrastructure in code. • Version controlled infrastructure. • Repeatable template. • Testable infrastructure. • Automate it!
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ASYNCHRONOUS AND EVENT-DRIVEN PATTERNS WILL HELP YOU SCALE 5
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Message passing for async. patterns A Queue B A Queue BListener Pub-Sub SNS, SQS, Redis, RabbitMQ
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Async. Architecture (part 1) Web Instances Worker Instance Worker Instance Queue API Instance API Instance API Instance API: {DO foo} PUT JOB: {JobID: 0001, Task: DO foo} API: {JobID: 0001} GET JOB: {JobID: 0001, Task: DO foo} ElastiCache Result: { JobID: 0001, Result: bar }
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Async. Architecture (part 2) Worker Instance Worker Instance Queue API Instance API Instance API Instance ElastiCache Amazon SNS Push Notification User
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Web Instance Web Instance Amazon Route 53User Amazon S3 Amazon Cloudfront ElastiCache Worker Instance Worker Instance Decoupling Queue Amazon SNS
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event driven pattern A B CEvent on B by A triggers C Invocation Lambda functions Action
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How Lambda works S3 event notifications DynamoDB Streams Kinesis events Cognito events SNS events Custom events CloudTrail events LambdaDynamoDB Kinesis S3 Any custom Invoked in response to events - Changes in data - Changes in state Redshift SNS Access any service, including your own Such as… Lambda functions CloudWatch events
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event-driven using Lambda AWS Lambda: Resize Images Users upload photos S3: Source Bucket S3: Destination Bucket Triggered on PUTs
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DON’T FORGET TO SCALE THE DATABASE (SHARDING TO THE RESCUE) 6
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Read / Write Sharding RDS DB Instance Read Replica App Instance App Instance App Instance RDS DB Instance Master (Multi-AZ) RDS DB Instance Read Replica RDS DB Instance Read Replica
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database Federation Users DB Products DB App Instance App Instance App Instance
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database Sharding User ShardID 002345 A 002346 B 002347 C 002348 B 002349 A CBA App Instance App Instance App Instance
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MEASURE, MEASURE, AND MEASURE 7
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Measure __everything__ • Nurture a culture of measuring everything. • Make it easy to measure. • Setup alarms and escalation paths. • Learn and work to automate responses.
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DynamoDB at Amazon “A deep dive on how we were using our existing databases revealed that they were frequently not used for their relational capabilities. About 70 percent of operations were of the key-value kind, where only a primary key was used and a single row would be returned. About 20 percent would return a set of rows, but still operate on only a single table.” Werner Vogels
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Measuring without Operational Targets is often Useless • How can you progress if you have no targets? • Load test • Set target and make data driven decisions, not hunch based.
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PLAN FOR THE WORST, PREPARE FOR THE UNEXPECTED 8
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The best way to know if you are resilient to failure is to TEST failures.
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. YOU BUILD IT, YOU RUN IT! 9
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BE HUMBLE, LEARN FROM OTHERS, MAKE HISTORY 10
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://medium.com/@NetflixTechBlog https://engineering.instagram.com/ http://www.allthingsdistributed.com/ http://highscalability.com/ https://segment.com/blog/categories/engineering/ https://reinvent.awsevents.com/ https://www.meetup.com/topics/amazon-web-services/
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RECAP
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1. EMBRACE FAILURE 2. LOCAL STATE IS A CLOUD ANTI-PATTERN 3. IMMUTABLE INFRASTRUCTURE 4. INFRASTRUCTURE AS CODE 5. ASYNCHRONOUS AND EVENT-DRIVEN PATTERNS WILL HELP YOU SCALE 6. DON’T FORGET TO SCALE THE DATABASE (SHARDING TO THE RESCUE) 7. MEASURE, MEASURE, AND MEASURE 8. PLAN FOR THE WORST, PREPARE FOR THE UNEXPECTED 9. YOU BUILD IT, YOU RUN IT! 10.LEARN FROM OTHERS. 10 Lessons from 10 Years of AWS
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! Questions? Twitter: @adhorn