Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Architectures and Strategies for Building Moder...

Architectures and Strategies for Building Modern Applications on AWS

The fastest modern software companies are 440x faster than the slowest. High performing organizations build faster, deploy faster, have less downtime, and recover from downtime and failures faster.

This presentation discusses the modern application strategies that enable a software company to be 440x faster, from the usage of AWS Lambda and Docker in the cloud, to creating the right company culture that enables innovation.

It also shows examples of modern architectures from FINRA (Financial Industry Regulatory Authority), McDonald's, and Product Hunt, showing how these three companies are using modern application architecture to deliver results to their customers faster and more easily.

Nathan Peck

April 04, 2018
Tweet

More Decks by Nathan Peck

Other Decks in Technology

Transcript

  1. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Nathan Peck Developer Advocate, Container Services @nathankpeck SRV 205 Architectures and Strategies for Building Modern Applications on AWS
  2. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Key Primitives of a Cloud Native “…application is container-based” “…dynamically managed…” …microservice oriented…” Application?
  3. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Speed Scale Resiliency Why Building Cloud Native Matters
  4. The fast companies are 440x faster than the slow We

    found that, compared to low performers, high performers have: 46x more frequent code deployments 440x faster lead time from commit to deploy 96x faster mean time to recover from downtime 5.0x lower change failure rate (changes are 1/5 as likely to fail) Time to Value
  5. Low performers High performers Deploy frequency (# of deploys per

    year) 0 400 800 1,200 1,600 2014 2015 2016 2017 Containers Enable Fast Deployments
  6. 0 20 40 60 80 100 2014 2015 2016 2017

    0 20 30 40 50 60 10 Mean time to recover (hours) Change failure rate (percentage) Low performers High performers 2014 2015 2016 2017 Containers Enable Immutable Changes/Rollback
  7. Cloud Native Principle #1 Cloud Native Applications enable high functioning

    organizations to build and ship features faster!
  8. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Key Building Blocks for Success Culture Cloud Containers + Functions
  9. Cloud Migration Pay as you go DATACENTER Applications and data

    Pay up front and depreciate over three years Pay a month later for the number of seconds used
  10. Cloud Native Principle #2 Pay for what you used last

    month, not what you guess you will need next year. Enable teams to experiment and fail fast, without significant investment.
  11. File tickets and wait for every step Self service, on-demand,

    no delays ! VS ! ! Deploy by filing a ticket and waiting days or weeks Deploy by making an API call self service within minutes
  12. Cloud Native Principle #3 Self service, API driven, automated. Move

    from request tickets at every step to self-service APIs and tools that empower teams.
  13. Elasticity DATA CENTER Hard to get over 10% utilization— need

    extra capacity in case of peak. CLOUD Target over 40% utilization— and scale on demand for any size workload.
  14. Cloud Native Principle #4 Turn it off when it’s idle.

    Scale for workloads of any size. Many times higher utilization. Huge cost savings.
  15. Microservices limit “blast radius” for software incidents Build and deploy

    loosely coupled services. Enable teams to move fast independently. Reduce blast radius via service and deployment isolation.
  16. Cloud Native Principle #5 Microservices reduce blast radius, can improve

    MTTR, and support globally distributed deployment models.
  17. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Key Building Blocks for Success Culture Cloud Containers + Functions
  18. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “You don’t add innovation to a culture, you get out of its way.” —Adrian Cockcroft, VP Cloud Architecture Strategy, AWS
  19. “Not what happens IF it fails, but what happens WHEN

    it fails.” —Nora Jones, Author, and Sr. Chaos Engineer at Netflix
  20. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. So What Does A Modern App Look Like? How you run and interact with it How it integrates How you monitor it
  21. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Lambda Bring your own code • Node.js, Java, Python, C#, Go • Bring your own libraries (even native ones) Simple resource model • Select power rating from 128 MB to 3 GB • CPU and network allocated proportionately Flexible use • Synchronous or asynchronous • Integrated with other AWS services Flexible authorization • Securely grant access to resources and VPCs • Fine-grained control for invoking your functions
  22. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Lambda Authoring functions • WYSIWYG editor or upload packaged .zip • Third-party plugins (Eclipse, Visual Studio) Monitoring and logging • Metrics for requests, errors, and throttles • Built-in logs to Amazon CloudWatch Logs Programming model • Use processes, threads, /tmp, sockets normally • AWS SDK built in (Python and Node.js) Stateless • Persist data using external storage • No affinity or access to underlying infrastructure
  23. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. FINRA performs 500 Billion validations daily using AWS Lambda “Using AWS Lambda, we’ve increased cost efficiency by a factor of two” —Tim Griesbach, Senior Director of Technology, FINRA
  24. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. … Amazon RDS Incoming files to be audited On-premises data center NAS FTP Controller on EC2 Amazon SQS Amazon SQS Amazon SQS Amazon S3 Logs to CloudWatch Logs Lambda preforms record validations Consumers Copy files to S3 Controller manages Lambda process
  25. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Elastic Container Service (ECS) Container-Level Networking Advanced task placement Deep integration with AWS platform ECS CLI … { } Global footprint Powerful scheduling engines Auto scaling CloudWatch metrics Load balancers
  26. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Critical Business Requirements Speed to market Scalability and reliability Multi-country support and integration Cost sensitivity
  27. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Key Architecture Principles Microservices Containers and orchestration PaaS Synchronous and event based
  28. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon RDS ElastiCache (Redis) Amazon S3 Amazon SQS Auto Scaling Group Multi-AZ Auto Scaling Group Multi-AZ Microservice 1 Microservice 2 Amazon ECS McD API Middleware Third-party Delivery Platforms Menu and Restaurant Master Restaurant Application Load Balancer
  29. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Built entire system in months, all on AWS Out of the box integration and deployment models with ECS simplified DevOps pipeline Open platform that integrates with any restaurant and global delivery partners Over 20K transactions per second, sub 100 millisecond latency Cost effective, even with extremely low transaction values
  30. Simple, easy to use, powerful consumption model Resource based pricing

    Fargate No instances to manage Container native API
  31. Running Containers EC2 Instance Task Task Task Task EC2 Instance

    Task Task Task Task EC2 Instance Task Task Task Task EC2 Instance Task Task Task Task EC2 Instance Task Task Task Task
  32. Availability Zone #1 Availability Zone #2 Availability Zone #3 Scheduling

    and Orchestration Cluster Manager Placement Engine Running Containers at Scale with ECS E C S Amazon
  33. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Entire website runs as microservices. Ruby & GraphQL backend with node.js frontend Needed ability to scale quickly, schedule multi- container workloads, network layer control All in on AWS—Moved entire infrastructure to AWS and Fargate in Jan 2018 Fargate scales quickly with traffic spikes, running ~25 tasks at baseline in production
  34. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Public Subnet Private Subnet CDN External ALB Backend Web External API External Frontend Web External Card/Scraper Service Background Job Queues Background Workers Internal ALB Background Web Internal
  35. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “We moved to Fargate because we need the ability to scale quickly up from baseline, run multi-container workloads, and get fine-grained network control, without having to manage our own infrastructure.”
  36. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Elastic Container Service for Kubernetes (EKS) Managed Kubernetes Control Plane Upstream and certified conformant Native AWS Integrations Built with the community Global footprint Highly available On-demand upgrades Generally available in 2018
  37. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. mycluster.eks.amazonaws.com EKS Worker Nodes Kubectl AZ 1 AZ 2 AZ 3 Your AWS account Amazon EKS
  38. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Elastic Container Service for Kubernetes (EKS) Managed Kubernetes Control Plane Upstream and certified conformant Native AWS Integrations Built with the community Global footprint Highly available On-demand upgrades Generally available in 2018
  39. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Application Integration: Orchestration Coordinate the components of distributed apps using visual workflows AWS Step Functions
  40. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Monitoring: Amazon Cloudwatch • Get metrics on key resources • Observe application and operational health • Monitor custom metrics and log files Monitor • SNS notifications • Automated alarm actions • Event-driven corrective actions Act • Visualize through Dashboards • 1-sec granularity • Unified operational view • 15-months of data retention Analyze
  41. © 2018, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Distributed Tracing • Analyze and debug performance of distributed applications • View latency distribution and identify performance bottlenecks • Ready to use in production with low latency in real-time AWS X-Ray • Identify specific user impact across an application • Works across AWS and non-AWS services