SlideShare a Scribd company logo
Designing For Elasticity On AWS
November 9th, 2015 - CSA Meetup Oslo
Who am I?
Anton Babenko
Sr. Software Engineer at Telenor Digital
Active user of AWS since 2010. Organizer of AWS User Group Norway meetup.
Before:
Web-developer, consultant and tech lead for the last 10 years.
Zoozoo.com, mCash, SnappOrder, and many more.
E-mail: anton@antonbabenko.com
LinkedIn: https://www.linkedin.com/in/antonbabenko
Github: http://github.com/antonbabenko
Agenda:
1) AWS and Elasticity
2) Application layer
3) AWS Services
What is AWS?
What is AWS?
• Low infrastructure cost
• No guesses and planning upfront required
• Unlimited scalability
• Highly reliable
What is AWS?
Scalability, Security, High-availability, Testability, Fault-tolerance and Elasticity are configurable
properties of the AWS platform on which application is running.
What does elasticity mean?
How designing for cloud is different?
The cloud changes several processes, patterns, practices, philosophies and reinforces some
traditional service-oriented architectural principles that you have learnt as they are even more
important than before.
How designing for cloud is different?
The cloud reinforces SOA principles:
• Service loose coupling
• Service abstraction
• Service reusability
• Service autonomy
• Service statelessness
• Service discoverability
• ...
How designing for cloud is different?
The cloud brings some new philosophies:
• Building scalable architectures
• Understanding elasticity
• Not fearing constraints
How designing for AWS is different?
• Not fearing constraints = “be creative in AWS-way”
• “Design for failure and nothing fails”
SOA principles reinforced:
• Service loose coupling - all
• Service reusability - EC2, S3, Route53
• Service discoverability - AS, tagging
• ...
How to make app to get most of AWS in term of
elasticity?
App should be scalable to be able to utilize cloud advantages fully.
What about web app ?
Web applications must be:
1) Stateless
2) Loosely coupled
3) Able to scale horizontally
Advices:
• Think parallel
• Leverage different storage options
• Automate everything
Read 12factor by Heroku.
How to implement elasticity on AWS?
How to implement elasticity on AWS?
Use Elastic Load Balancer:
• Not free, but cheaper than your managed HAProxy (ELB
costs $0.028 pr. hour = $245 pr year)
https://aws.amazon.com/elasticloadbalancing/
How to implement elasticity on AWS?
Use Auto Scaling:
• Free
• Optionally combine with ELB
https://aws.amazon.com/autoscaling/
How to implement elasticity on AWS?
Monitor what is going on using standard Cloudwatch metrics
or add custom metrics.
• Dashboard (new!)
https://aws.amazon.com/cloudwatch/
How to implement elasticity on AWS?
Use dynamic configuration to bootstrap instances:
• SimpleDB or DynamoDB can keep configurations, for example
https://aws.amazon.com/simpledb/
https://aws.amazon.com/dynamodb/
How to implement elasticity on AWS?
Automate everything:
• Cloudformation
• AWS CLI
• Terraform by Hashicorp
• …
https://aws.amazon.com/cloudformation/
https://aws.amazon.com/cli/
https://www.terraform.io/
How to get most of AWS?
1) Use free tier
2) Use Route53
3) Use Cloudfront
4) Experiment with instance types
5) Decide which pricing model fits your needs best
6) Use latest AMI and latest instance types
7) Read A Comprehensive Guide to Building a
Scalable Web App on Amazon Web Services
8) Browse Cloud Design Pattern
Are you well-architected?
AWS Well-Architected Framework
• Security
• Reliability
• Performance efficiency
• Cost Optimization
Questions ?
Thank you!
We are
hiring!
Credits:
https://sdqweb.ipd.kit.edu/publications/pdfs/HeKoRe2013-ICAC-Elasticity.pdf
http://en.wikipedia.org/wiki/Service-oriented_architecture
https://www.airpair.com/aws/posts/building-a-scalable-web-app-on-amazon-web-services-p1
http://en.clouddesignpattern.org/
http://aws.amazon.com/architecture/
http://d0.awsstatic.com/whitepapers/architecture/AWS_Well-Architected_Framework.pdf

More Related Content

PPTX
Managing AWS infrastructure using CloudFormation
PDF
Amazon ECS (December 2015)
PDF
Deploying a simple Rails application with AWS Elastic Beanstalk
PDF
A real-life account of moving 100% to a public cloud
PPTX
Moving Viadeo to AWS (2015)
PDF
AWS CloudFormation (February 2016)
PDF
Docker Paris #28
PDF
How to copy multiple files from local to aws s3 bucket using aws cli
Managing AWS infrastructure using CloudFormation
Amazon ECS (December 2015)
Deploying a simple Rails application with AWS Elastic Beanstalk
A real-life account of moving 100% to a public cloud
Moving Viadeo to AWS (2015)
AWS CloudFormation (February 2016)
Docker Paris #28
How to copy multiple files from local to aws s3 bucket using aws cli

What's hot (17)

PDF
Amazon ECS (March 2016)
PDF
Docker Paris #29
PPTX
Perl and Amazon Web Services
PDF
Running Docker clusters on AWS (June 2016)
PDF
Building serverless apps with Node.js
PDF
Using Amazon CloudWatch Events, AWS Lambda and Spark Streaming to Process EC...
PPTX
Advanced Discussion on Cloud Formation
PDF
Building a data warehouse with Amazon Redshift … and a quick look at Amazon ...
PDF
Building a Serverless Pipeline
PPTX
AWS elastic beanstalk
PPTX
Real World AWS Deployment With Boto, Fabric, and Cloud Formation
PPTX
[AWSKRUG 아키텍처 모임] 세일즈부스트 인프라스트럭처 사례 공유
PDF
Scaling WordPress - WP on AWS
PDF
Introduction to the Serverless paradigm
PPTX
WordPress on S3: no more backups
PDF
Infrastructure as code with Amazon Web Services
PPTX
AWS Cloud Formation
Amazon ECS (March 2016)
Docker Paris #29
Perl and Amazon Web Services
Running Docker clusters on AWS (June 2016)
Building serverless apps with Node.js
Using Amazon CloudWatch Events, AWS Lambda and Spark Streaming to Process EC...
Advanced Discussion on Cloud Formation
Building a data warehouse with Amazon Redshift … and a quick look at Amazon ...
Building a Serverless Pipeline
AWS elastic beanstalk
Real World AWS Deployment With Boto, Fabric, and Cloud Formation
[AWSKRUG 아키텍처 모임] 세일즈부스트 인프라스트럭처 사례 공유
Scaling WordPress - WP on AWS
Introduction to the Serverless paradigm
WordPress on S3: no more backups
Infrastructure as code with Amazon Web Services
AWS Cloud Formation
Ad

Similar to Designing for elasticity on AWS - 9.11.2015 (20)

PPTX
Designing for elasticity on AWS
PDF
Dean Bryen: Scaling The Platform For Your Startup
PDF
What is Amazon Web Services & How to Start to deploy your apps ?
PPTX
Auto scaling websites in the cloud
PPTX
Architecting Cloud Apps
PPTX
Journey Towards Scaling Your Application to Million Users
PPTX
Migrating enterprise workloads to AWS
PPTX
Web App Security -Pradeep K.pptx
PDF
AWS Intro for Knight News Fellows
PDF
Being Well Architected in the Cloud
PPTX
Being Elastic -- Evolving Programming for the Cloud
PDF
Scale, baby, scale! (June 2016)
PPTX
Migrating enterprise workloads to AWS
PDF
Scaling on AWS for the First 10 Million Users at Websummit Dublin
PPTX
The Effect of Cloud Computing on Growth of Startups and Entrepreneurship
PPTX
Aws best practices
PDF
Amazon AWS - a quick review
PDF
AMAZON CLOUD Course Content
PDF
Crio.do - Deployment on AWS Masterclass
PPTX
Journey Towards Scaling Your Application to Million Users
Designing for elasticity on AWS
Dean Bryen: Scaling The Platform For Your Startup
What is Amazon Web Services & How to Start to deploy your apps ?
Auto scaling websites in the cloud
Architecting Cloud Apps
Journey Towards Scaling Your Application to Million Users
Migrating enterprise workloads to AWS
Web App Security -Pradeep K.pptx
AWS Intro for Knight News Fellows
Being Well Architected in the Cloud
Being Elastic -- Evolving Programming for the Cloud
Scale, baby, scale! (June 2016)
Migrating enterprise workloads to AWS
Scaling on AWS for the First 10 Million Users at Websummit Dublin
The Effect of Cloud Computing on Growth of Startups and Entrepreneurship
Aws best practices
Amazon AWS - a quick review
AMAZON CLOUD Course Content
Crio.do - Deployment on AWS Masterclass
Journey Towards Scaling Your Application to Million Users
Ad

More from Anton Babenko (20)

PDF
Manage any AWS resources with Terraform 0.12 - April 2020
PDF
Terraform 0.12 + Terragrunt
PDF
Terraform Best Practices - DevOps Unicorns 2019
PDF
Terraform AWS modules and some best practices - September 2019
PDF
What you see is what you get for AWS infrastructure
PDF
Terraform AWS modules and some best-practices - May 2019
PDF
Terraform modules and some of best-practices - March 2019
PDF
What you see is what you get for AWS infrastructure
PDF
Gotchas using Terraform in a secure delivery pipeline
PDF
Описание инфраструктуры с Terraform на будущее
PDF
Preview of Terraform 0.12 + modules.tf - Kiev HUG meetup
PDF
Terraform modules and (some of) best practices
PDF
Terraform modules and (some of) best practices
PDF
Terraform modules and best-practices - September 2018
PDF
Building infrastructure as code using Terraform - DevOps Krakow
PDF
Terraform Q&A - HashiCorp User Group Oslo
PDF
"I’ve heard you know infrastructure"
PDF
Terraform in deployment pipeline
PPTX
"Continuously delivering infrastructure using Terraform and Packer" training ...
PDF
Continuous delivery in AWS
Manage any AWS resources with Terraform 0.12 - April 2020
Terraform 0.12 + Terragrunt
Terraform Best Practices - DevOps Unicorns 2019
Terraform AWS modules and some best practices - September 2019
What you see is what you get for AWS infrastructure
Terraform AWS modules and some best-practices - May 2019
Terraform modules and some of best-practices - March 2019
What you see is what you get for AWS infrastructure
Gotchas using Terraform in a secure delivery pipeline
Описание инфраструктуры с Terraform на будущее
Preview of Terraform 0.12 + modules.tf - Kiev HUG meetup
Terraform modules and (some of) best practices
Terraform modules and (some of) best practices
Terraform modules and best-practices - September 2018
Building infrastructure as code using Terraform - DevOps Krakow
Terraform Q&A - HashiCorp User Group Oslo
"I’ve heard you know infrastructure"
Terraform in deployment pipeline
"Continuously delivering infrastructure using Terraform and Packer" training ...
Continuous delivery in AWS

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation theory and applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
A Presentation on Artificial Intelligence
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25 Week I
A Presentation on Artificial Intelligence
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Designing for elasticity on AWS - 9.11.2015

Editor's Notes

  • #6: Scalability, Security, High-availability, Testability, Fault-tolerance and Elasticity are configurable properties of the platform on which application is running Elasticity is a fundamental property of the Cloud SQS was the first service November 2004
  • #7: Scalability, Security, High-availability, Testability, Fault-tolerance and Elasticity are configurable properties of the platform on which application is running Elasticity is a fundamental property of the Cloud
  • #8: Elasticity (in the cloud) is the ability of an application to automatically adjust the infrastructure resources it uses to accommodate varied workloads and priorities, while maintaining availability and performance. Elasticity is a key for startups, who used to buy hardware in advance (slashdot effect) Elasticity is a fundamental property of the Cloud
  • #9: How designing for cloud is different? cloud reinforces some old concepts of building highly scalable Internet architectures cloud introduces some new concepts that entirely change the way applications are built and deployed It is critical to build a scalable architecture in order to take advantage of a scalable infrastructure. Characteristics of a truly scalable application: Increasing resources results in a proportional increase in performance A scalable service is capable of handling heterogeneity A scalable service is operationally efficient A scalable service is resilient A scalable service should become more cost effective when it grows (Cost per unit reduces as the number of units increases) Constraints (bonus: better split of components in SOA): Not enough RAM => use distributed memcached Not enough IOPS for DB => consider other data storage solutions (AWS specific); use sharding; use read-replicas
  • #10: Few SOA principles: Service loose coupling: Services maintain a relationship that minimizes dependencies and only requires that they maintain an awareness of each other. Service abstraction: Beyond descriptions in the service contract, services hide logic from the outside world. Service reusability: Logic is divided into services with the intention of promoting reuse. Service autonomy: Services have control over the logic they encapsulate, from a Design-time and a Run-time perspective. Service statelessness: Services minimize resource consumption by deferring the management of state information when necessary[16] Service discoverability: Services are supplemented with communicative meta data by which they can be effectively discovered and interpreted. It is critical to build a scalable architecture in order to take advantage of a scalable infrastructure. Characteristics of a truly scalable application: Increasing resources results in a proportional increase in performance A scalable service is capable of handling heterogeneity A scalable service is operationally efficient A scalable service is resilient A scalable service should become more cost effective when it grows (Cost per unit reduces as the number of units increases) Constraints (bonus: better split of components in SOA): Not enough RAM => use distributed memcached Not enough IOPS for DB => consider other data storage solutions (AWS specific); use sharding; use read-replicas
  • #11: It is critical to build a scalable architecture in order to take advantage of a scalable infrastructure. Characteristics of a truly scalable application: Increasing resources results in a proportional increase in performance A scalable service is capable of handling heterogeneity A scalable service is operationally efficient A scalable service is resilient A scalable service should become more cost effective when it grows (Cost per unit reduces as the number of units increases) Constraints (bonus: better split of components in SOA): Not enough RAM => use distributed memcached Not enough IOPS for DB => consider other data storage solutions (AWS specific); use sharding; use read-replicas
  • #12: KNOW/LEARN AWS SERVICES Amazon has developed several elastic web-services already - EC2, EBS, ELB, EMR, ElastiCache, EFS, Elastic Beanstalk, etc. Even more internal terms like - Elastic Compute Unit, ENI, Elastic IP --- Everything fails all the time (с) Werner Vogels, CTO Amazon. This was very much true back in 2010 when Netflix moved to AWS. AWS is much more stable nowadays, but designing for failure is still important, because it makes you think about available alternatives and follow SOA principles (eg, service loose coupling).
  • #13: How to actually make app to get best of AWS in term of elasticity?
  • #14: Reminder: Scalability, Security, High-availability, Testability, Fault-tolerance and Elasticity are configurable properties of the AWS platform where application is running
  • #15: Loose coupling principle in real life: Avoid SPOF, for example, unnecessary dependencies between zones (eg: 2 zones for apps sharing same db hosted in one zone) Splitting a system into tiers allows managing the availability and scalability of each tier independently. Deploy critical components of your application across multiple AZ and replicate your data appropriately; Loose coupling allow to scale horizontally to higher degree and with less resources Automate everything: Handle dynamic IP addressing when your instance restarts by reassigning it tooling is important --- 12factor was written by Heroku as a marketing material to their PAAS solution. “Execute the app as one or more stateless processes” is often a good starting point.
  • #17: Achieving Even Better Fault Tolerance for Your Applications DNS Failover for Elastic Load Balancing (if ELB is not healthy or no instances in it) Auto Scaling with Elastic Load Balancing
  • #18: Autoscaling with values: min=max=1, self-healing Fixed amount of instances, or scale up/down by cloudwatch metric, or by time schedule
  • #19: Cloudwatch Monitor what is going on using standard Cloudwatch metrics or add custom metrics. Dashboard (new!)
  • #20: SimpleDB / DynamoDB Use dynamic configuration to bootstrap instances: SimpleDB or DynamoDB can keep configurations, for example https://aws.amazon.com/simpledb/ https://aws.amazon.com/dynamodb/
  • #21: Automate everything: Cloudformation AWS CLI Terraform by Hashicorp is way better
  • #22: Use free tier Use Route53 (internal DNS at least. Combinations of latency based and failover strategies) Use Cloudfront to optimize connections Decide which instance family to use for your app Decide which pricing model fits your needs best (spot instances can be up to 10 times cheaper than on-demand even for web tier) Use latest AMI and latest instance types
  • #23: The AWS Well-Architected Framework is based around four pillars: Security – The ability to protect information systems and assets while delivering business value through risk assessments and mitigation strategies. Reliability – The ability to recover from infrastructure or service failures, dynamically acquire computing resources to meet demand, and mitigate disruptions such as misconfigurations or transient network issues. Performance Efficiency -The efficient use computing resources to meet system requirements, and maintaining that efficiency as demand changes and technologies evolve. Cost Optimization – The ability to avoid or eliminate unneeded cost or suboptimal resources.