UPLOAD

    3.5K

    Modern Application development - 26 September - 13:00

    Published: October 16, 2019

    AWS Loft Istanbul 2019 Modern Application development - 26 September - 13:00

    Comments

    Modern Application development - 26 September - 13:00

    • 1. Developing Modern Applications in the Cloud © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Developing Modern Applications in the Cloud COBUS BERNARD AWS SENIOR TECHNICAL EVANGELIST @cobusbernard
    • 2. Slide278 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Invention requires two things: the ability to try a lot of experiments, and not having to live with the collateral damage of failed experiments.“ Andy Jassy CEO, Amazon Web Services
    • 3. To maintain competitive advantage, digital businesses must innovate as rapidly as possible © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. To maintain competitive advantage, digital businesses must innovate as rapidly as possible Feedback Ideas Experiment Innovation Flywheel
    • 4. Capabilities of a modern application © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Capabilities of a modern application
    • 5. Modern application development: a journey with many paths © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Assess and prioritize, app by app Pick path to modernization Lift & shift: data center → EC2 Re-platform: VMs → containers Refactor: monolith → microservices Re-invent: host fleets → serverless Modern application development: a journey with many paths
    • 6. Security © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Security
    • 7. Security © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Organizations AWS Key Management Service AWS CloudTrail Security AWS Systems Manager (Session Manager) AWS Secrets Manager (Parameter Store) AWS Shield MFA token AWS Identity and Access Management Amazon Cognito AWS Certificate Manager Amazon CloudFront
    • 8. Structure Apps as collection of Microservices © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structure Apps as collection of Microservices
    • 9. Structure apps as collections of microservicesWhen the impact of change is small,release velocity can increase © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structure apps as collections of microservices When the impact of change is small, release velocity can increase Monolithic application Does everything Shared release pipeline Rigid scaling High impact of change Hard to adopt new technologies Microservices Does one thing Independent deployments Independent scaling Small impact of change Choice of technology
    • 10. Structure apps as collections of microservices When the impact of change is small,release velocity can increase © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structure apps as collections of microservices When the impact of change is small, release velocity can increase Do one thing – Well Microservices
    • 11. Structure apps as collections of microservices Properties of microservices © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structure apps as collections of microservices Properties of microservices •Independent •Individually Deployed & Scaled •Polyglot •Modular - Easily Replaced •Decentralized Microservices
    • 12. Structure apps as collections of microservices Design Concepts © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structure apps as collections of microservices Design Concepts •Use managed services •Focus on writing your business logic (not on maintaining infrastructure) •Loosely coupled & event driven •Simplify delivery and discovery Amazon API Gateway AWS Lambda AWS Fargate Amazon SNS (Pub/Sub) AWS Cloud Map Amazon DynamoDB
    • 13. Structure apps as collections of microservices APIs and decoupled communications enable automation and improves reliability © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structure apps as collections of microservices APIs and decoupled communications enable automation and improves reliability FUNCTION API API MICROSERVICE FUNCTION EVENT API MICROSERVICE EVENT API MICROSERVICE APPLICATION
    • 14. Abstractions © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Abstractions Rigid Flexible Easy Hard 1 System N Systems 2 Systems
    • 15. Technical Debt © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Technical Debt Cost Time Absolute
    • 16. Technical Debt © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Technical Debt Time Cost Relative Absolute
    • 17. Monoliths are OK © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith Does everything Monoliths are OK
    • 18. Databases © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Databases
    • 19. Common data categories and use cases © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Common data categories and use cases Relational Referential integrity, ACID transactions, schema- on-write Lift and shift, ERP, CRM, finance Key-value High throughput, low- latency reads and writes, endless scale Real-time bidding, shopping cart, social, product catalog, customer preferences Document Store documents and quickly access querying on any attribute Content management, personalization, mobile In-memory Query by key with microsecond latency Leaderboards, real-time analytics, caching Graph Quickly and easily create and navigate relationships between data Fraud detection, social networking, recommendation engine Time-series Collect, store, and process data sequenced by time IoT applications, event tracking Ledger Complete, immutable, and verifiable history of all changes to application data Systems of record, supply chain, health care, registrations, financial
    • 20. Build with Serverless Technologies as much as possible © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Build with Serverless Technologies as much as possible
    • 21. Build with serverless technologies as much as possibleAutomation and abstraction frees you © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Build with serverless technologies as much as possible Automation and abstraction frees you No infrastructure to provision or manage Automatically scales by unit of consumption Pay for value billing model Highly available and durable
    • 22. Use Code to model Applications and Infrastructure © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use Code to model Applications and Infrastructure
    • 23. Use code to model applications and infrastructureTreating everything as software increases the speed and agility of infrastructure deployments © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use code to model applications and infrastructure Treating everything as software increases the speed and agility of infrastructure deployments
    • 24. Use code to model applications and infrastructure Infrastructure as code © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use code to model applications and infrastructure Infrastructure as code Declarative I tell you what I need I tell you what to do Imperative
    • 25. Use code to model applications and infrastructure Infrastructure as code goals © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use code to model applications and infrastructure Infrastructure as code goals Infrastructure as code 1.Make infrastructure changes repeatable and predictable 2.Release infrastructure changes using the same tools as code changes 3.Replicate production environment in a staging environment to enable continuous testing
    • 26. Model container environments with AWSCloud Development Kit (CDK) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Model container environments with AWS Cloud Development Kit (CDK) •Open source framework to define cloud infrastructure in TypeScript, Java, C#, … •Provides library of higher-level resource types (“construct” classes) that have AWS best practices built in by default, packaged as npm modules •Provisions resources with CloudFormation •Supports all CloudFormation resource types AWS CDK https://awslabs.github.io/aws-cdk
    • 27. AWS Cloud Development Kit (CDK) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Cloud Development Kit (CDK) npm install -g aws-cdk cdk init app --language typescript cdk synth cdk diff cdk deploy cdk destroy CodePipeline Use CloudFormation deployment actions with any synthesized CDK application Jenkins Use CDK CLI TypeScript C# F# Java Python …
    • 28. Use code to model applications and infrastructure Model function environments with AWS Serverless Application Model (SAM) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use code to model applications and infrastructure Model function environments with AWS Serverless Application Model (SAM) •Open source framework for building serverless applications on AWS •Shorthand syntax to express functions, APIs, databases, and event source mappings •Transforms and expands SAM syntax into AWS CloudFormation syntax on deployment •Supports all AWS CloudFormation resource types https://aws.amazon.com/serverless/sam/
    • 29. Rapidly release High Quality Features with CI/CD © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rapidly release High Quality Features with CI/CD
    • 30. Rapidly release high-quality features with CI/CDTeams that practice CI/CD ship more code faster, and with more confidence © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rapidly release high-quality features with CI/CD Teams that practice CI/CD ship more code faster, and with more confidence Source: Puppet 2017 State of DevOps Report 5x Lower change failure rate 440x Faster from commit to deploy 46x More frequent deployments 44% More time spent on new features & code
    • 31. Rapidly release high-quality features with CI/CD Monolith development lifecycle © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rapidly release high-quality features with CI/CD Monolith development lifecycle monitor release test build developers delivery pipelines services
    • 32. Rapidly release high-quality features with CI/CD Microservice development lifecycle © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. developers services monitor release test build delivery pipelines monitor release test build monitor release test build monitor release test build monitor release test build monitor release test build Rapidly release high-quality features with CI/CD Microservice development lifecycle
    • 33. Slide1291 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers have become the standard for how to ship and run your application in the cloud
    • 34. Containers and Docker © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers and Docker A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.1 1 https://www.docker.com/resources/what-container Server Operating System Docker Engine App A App B App C App D
    • 35. Containers and Microservices © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers and Microservices •Do one thing, really well •Any app, any language •Isolated execution environment •Test and deploy same artifact •Faster startup Container Container Container Container
    • 36. Slide1292 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Manually downloading and launching containers by hand is inefficient and error prone
    • 37. Slide1310 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container orchestration
    • 38. Build with serverless technologies as much as possibleAWS container services landscape © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Build with serverless technologies as much as possible AWS container services landscape Management Deployment, Scheduling, Scaling & Management of containerized applications Hosting Where the containers run Amazon Elastic Container Service Amazon Elastic Container Service for Kubernetes Amazon EC2 AWS Fargate Image Registry Container Image Repository Amazon Elastic Container Registry
    • 39. Amazon ECS key components © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS key components Development cluster Container instance Container instance Container instance Production cluster Container instance Container instance Container instance Amazon Elastic Container Service (Amazon ECS) Container Container Volume Task definition Amazon Elastic Container Registry
    • 40. EKS Architecture © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. mycluster.eks.amazonaws.com Availability Zone 1 Availability Zone 2 Availability Zone 3 Kubectl EKS Architecture
    • 41. Microservice communication © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservice communication •IP / Ports constantly changing •TLS between services •Metrics •Monitoring •Auth
    • 42. Service Mess © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Service Mess
    • 43. Slide1801 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    • 44. Slide569 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Istio Service Mesh with Envoy Proxy
    • 45. Open Source: Istio Service Mesh © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Open Source: Istio Service Mesh Connect, secure, and observe services •Shift in where functionality is located •Control plane = Istio •Data plane = set of all Envoy proxies •Envoy proxy as sidecar in K8s pod •Automatic or manual injection of proxy with EKS
    • 46. Data Plane (Proxy) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Plane (Proxy) •Touches every packet / request •Service discovery •Health Checking •Routing •Load Balancing •Authentication / Authorization •Observability
    • 47. Envoy Proxy © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Envoy Proxy •Level 7 proxy •HTTP, HTTP/2, gRPC, AWS Dynamo DB, MongoDB •C++11 code base , only 8 MB (statically linked) •No language or framework dependencies •Rquires no code changes •Battle proved OSS, started at Lyft •Works across compute options – also on EC2 •Envoy is not tightly coupled Istio
    • 48. Service Mesh © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Service Mesh But Docker / Kubernetes can do rolling updates! Yes, but Istio sparates traffic flow from replica deployment
    • 49. Slide613 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. A bath tub full of cold water ? K8s roling update 25% 1 pod at a time … or just wetten your feet? Service Mesh 3% Traffic routing 🛁 🛁 🛁 💦 🛀🏽 🛁 🌊❄️🌊❄️🌊❄️ Fancy a Swim in the Arctic Sea ? Blue / Green 100% All services at once Microservices Update Strategies
    • 50. User Based Routing            Traffic Shifting © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. User Based Routing Traffic Shifting
    • 51. Control Plane (Istio) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Control Plane (Istio) •Routing information •Policies & configuration
    • 52. App Mesh © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Based on Envoy proxy Start App Mesh from the AWS CLI, console or SDK There is no additional charge for using AWS App Mesh Supports any third-party tool that works with Envoy App Mesh
    • 53. App Mesh works across compute services © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. App Mesh works across compute services Amazon ECS AWS Fargate Amazon EKS Amazon EC2 Kubernetes on EC2
    • 54. Install AppMesh with Helm Chart © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Install AppMesh with Helm Chart # create ns and enable auto-injection $ kubectl create ns appmesh-demo $ kubectl label namespace appmesh-demo appmesh.k8s.aws/sidecarInjectorWebhook=enabled # deploy the demo $ helm install -n aws-appmesh-demo --namespace appmesh-demo https://github.com/.../aws-appmesh-demo.tgz https://github.com/PaulMaddox/aws-appmesh-helm
    • 55. Slide1348 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Logging HTTP access logging Amazon CloudWatch Logs Available as container logs on Amazon ECS, Amazon EKS, AWS Fargate Metrics CloudWatch metrics StatsD (with tags) Prometheus Tracing AWS X-Ray Other Envoy tracing drivers Observability
    • 56. Visualize Service Call Graph (Lambda) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visualize Service Call Graph (Lambda)
    • 57. Pinpoint errors (Lambda) © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pinpoint errors (Lambda)
    • 58. Open-Source Grafana © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Open-Source Grafana
    • 59. Open-Source Grafana © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Open-Source Grafana
    • 60. AWS App Mesh Roadmap is Public © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS App Mesh Roadmap is Public https://github.com/awslabs/aws-app-mesh-examples
    • 61. Slide1175 Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. COBUS BERNARD AWS SENIOR TECHNICAL EVANGELIST @cobusbernard
    • 62. Slide3 © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Please Complete Your Session Survey! Modern App Development https://bit.ly/2kSRRSH