UPLOAD

    13.9K

    Microservices on AWS Architectural Patterns and Best Practices - 26 September - 15:00

    Published: October 16, 2019

    AWS Loft Istanbul 2019 Microservices on AWS Architectural Patterns and Best Practices - 26 September - 15:00

    Comments

    Microservices on AWS Architectural Patterns and Best Practices - 26 September - 15:00

    • 1. Slide1
    • 2. Microservices on AWS: Architectural Patterns and Best Practices © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservices on AWS: Architectural Patterns and Best Practices
    • 3. AWS leadership team © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS leadership team Vice President Serverless David Richardson drr Director Containers and Linux Deepak Singh deesingh Director AWS Developer Tools Ken Exner exner
    • 4. Slide1713 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. “We want to be a large company that’s also an invention machine. We want to combine the extraordinary customer- serving capabilities that are enabled by size with the speed of movement, nimbleness, and risk-acceptance mentality normally associated with entrepreneurial start-ups.” —Jeff Bezos CEO, Amazon © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    • 5. Development transformation at Amazon: 2001-2002 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Development transformation at Amazon: 2001-2002 monolithic application + teams 2001 Lesson learned: Decompose for agility 2002 microservices + 2 pizza teams
    • 6. Two-pizza teams © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Full ownership Full accountability “DevOps” Focused innovation Two-pizza teams
    • 7. What changes have to be made in this new world? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What changes have to be made in this new world? Architectural patterns Operational model Software delivery
    • 8. Slide1736 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Changes to the architectural patterns
    • 9. When the impact of change is small,release velocity can increase © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. When the impact of change is small, release velocity can increase Monolith Does everything Microservices Does one thing
    • 10. Slide1339 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. MICROSERVICE API API MICROSERVICE MICROSERVICE EVENT API MICROSERVICE EVENT API MICROSERVICE APPLICATION PERSISTENCE PERSISTENCE Mobile client Client IoT
    • 11. APIs are the front door of microservices © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. APIs are the front door of microservices
    • 12. Manage APIs with API Gateway © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Manage APIs with API Gateway Mobile apps Websites Services Internet Amazon CloudFront Amazon CloudWatch monitoring API Gateway cache Any other AWS service All publicly accessible endpoints AWS Lambda functions Endpoints in your VPC Regional API Endpoints AWS Lambda functions Endpoints on Amazon EC2 Your VPC AWS
    • 13. WebSockets support in Amazon API Gateway © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. WebSockets support in Amazon API Gateway Real-time two-way communications Managed persistence Event-based triggers Mobile apps Chat Dashboards IoT devices Amazon API Gateway WebSockets API Stateful connection Stateless connection Lambda Functions Public Endpoints on Amazon EC2 Amazon Kinesis Any other AWS service All publicly accessible endpoints
    • 14. New: AWS Cloud Map © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Increase application availability Constantly monitor the health of every resource Dynamically update the location of each microservice Increase developer productivity Single registry for all app resources Define resources with user-friendly names Integration with Amazon container services AWS Fargate Amazon Elastic Compute Cloud (Amazon ECS) Amazon Elastic Container Service for Kubernetes (Amazon EKS) New: AWS Cloud Map AWS Cloud Map
    • 15. New: AWS App Mesh  © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Observability and traffic control Easily export logs, metrics, and traces Client side traffic policies—circuit breaking, retries Routes for deployments Works across clusters and container services Amazon ECS Amazon EKS Kubernetes on Amazon Elastic Compute Cloud (Amazon EC2) AWS Fargate (coming soon!) AWS built and run No control plane to manage Ease of operations High scale New: AWS App Mesh
    • 16. Event-driven architectures © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Event-driven architectures
    • 17. Decouple state from code using messaging © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Decouple state from code using messaging Queues Simple Fully managed Any volume Pub/sub Simple Fully managed Flexible Amazon Simple Queue Service Amazon Simple Notification Service Messaging Synchronization Rapid Fully managed Real-time Amazon CloudWatch Events
    • 18. And data streams © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. And data streams Ingest Data streams Data processing Real-time Data Store Microservices Performance at scale Fast and flexible Amazon Kinesis Data Streams Amazon Dynamo DB Data stream capture
    • 19. New: AWS Lambda supports Kinesis Data Streams enhanced fan-out and HTTP/2 for faster streaming © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. New: AWS Lambda supports Kinesis Data Streams enhanced fan-out and HTTP/2 for faster streaming Enhanced fan-out allows customers to scale the number of functions reading from a stream in parallel while maintaining performance HTTP/2 data retrieval API improves data delivery speed between data producers and Lambda functions by more than 65% Amazon Kinesis Data Streams
    • 20. Build workflows to orchestrate everything © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Track status of data and execution Remove redundant code Build workflows to orchestrate everything
    • 21. New: Richer workflows © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. New: Richer workflows Amazon Confidential Simplify building workloads such as order processing, report generation, and data analysis Write and maintain less code; add services in minutes More service integrations: AWS Step Functions Amazon Simple Notification Service Amazon Simple Queue Service Amazon SageMaker AWS Glue AWS Batch Amazon Elastic Container Service AWS Fargate
    • 22. Simpler integration, less code © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Simpler integration, less code With serverless polling With new service integration Amazon Confidential Start Submit job Wait X seconds Get job status Job complete? Set job failed Set job succeeded Sent message to SNS End Lambda functions Synchronously run a batch job Publish success to SNS Publish error to SNS Start End No Lambda functions
    • 23. Cloud-native architectures are small pieces, loosely joined © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cloud-native architectures are small pieces, loosely joined
    • 24. Slide1675 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Changes to the operational model
    • 25. Isn’t all of this very hard now that we have lots of pieces to operate? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Isn’t all of this very hard now that we have lots of pieces to operate?
    • 26. AWS operational responsibility models © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS operational responsibility models On-Premises Cloud Less More Compute Virtual Machine Amazon EC2 AWS Elastic Beanstalk Lambda Fargate Databases MySQL MySQL on Amazon EC2 Amazon RDS for MySQL Amazon RDS Amazon Aurora Serverless DynamoDB Storage Storage S3 Messaging ESBs Amazon MQ Amazon Kinesis SQS / SNS Analytics Hadoop Hadoop on EC2 EMR Amazon Elasticsearch Service Amazon Athena
    • 27. Cluster huggers are the new server huggers © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cluster huggers are the new server huggers
    • 28. Decision Tree – well, almost! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Inter-container communication* or storage- intensive? Yes Desire orchestration portability OR open source fan? Deployment Package size <= 50MB Desired Service runtime <= 15 minutes? Yes Decision Tree – well, almost! Amazon EKS Yes Are you comfortable managing your own infrastructure? No Amazon ECS AWS Fargate Yes No No AWS Lambda Yes No No No
    • 29. What is serverless? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What is serverless? Source: Digital Rewrites The Rules Of Business, Forrester, February 2018 No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
    • 30. Serverless is an operational model that spans many different categories of services © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless is an operational model that spans many different categories of services Source: Digital Rewrites The Rules Of Business, Forrester, February 2018 AWS Lambda AWS Fargate Amazon API Gateway Amazon SNS Amazon SQS AWS Step Functions COMPUTE DATA STORES INTEGRATION Amazon Aurora Serverless Amazon S3 Amazon DynamoDB AWS AppSync
    • 31. Let’s focus on compute for now © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless compute engine for containers Long-running Bring existing code Fully managed orchestration Let’s focus on compute for now Serverless event-driven code execution Short-lived All language runtimes Data source integrations AWS Fargate AWS Lambda
    • 32. Comparison of operational responsibility © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Comparison of operational responsibility AWS Lambda Serverless functions AWS Fargate Serverless containers Amazon ECS/ Amazon EKS Container-management as a service Amazon EC2 Infrastructure-as-a-Service More opinionated Less opinionated AWS manages Customer manages •Data source integrations •Physical hardware, software, networking, and facilities •Provisioning •Application code •Container orchestration, provisioning •Cluster scaling •Physical hardware, host OS/kernel, networking, and facilities •Application code •Data source integrations •Security config and updates, network config, management tasks •Container orchestration control plane •Physical hardware software, networking, and facilities •Application code •Data source integrations •Work clusters •Security config and updates, network config, firewall, management tasks •Physical hardware software, networking, and facilities •Application code •Data source integrations •Scaling •Security config and updates, network config, management tasks •Provisioning, managing scaling and patching of servers
    • 33. Making development easier with Lambda © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Making development easier with Lambda Trillions of requests every month for hundreds of thousands of active customers Accessible for all developers Enable new application patterns Greater productivity *New*: Support for all runtimes with Lambda Layers and Runtime API ISO, PCI, HIPAA, SOC, GDPR, and FedRamp compliances 15 minute functions SQS for Lambda *New*: Automatic Load Balancing for Lambda *New*: Support for Kinesis Data Streams enhanced fan-out and HTTP/2 *New*: Toolkits for popular IDEs: VSCode, IntelliJ, and PyCharm Simplified deployment with nested apps
    • 34. New: Lambda Layers © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. New: Lambda Layers Lets functions easily share code: Upload layer once, reference within any function Promote separation of responsibilities, lets developers iterate faster on writing business logic Built-in support for secure sharing by ecosystem
    • 35. New: Custom Runtimes © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. New: Custom Runtimes Bring any Linux compatible language runtime Powered by new Runtime API—Codifies the runtime calling conventions and integration points At launch, custom runtimes powering Ruby support in Lambda, more runtimes from partners (like Erlang) Custom runtimes distributed as “layers” Rule Stack
    • 36. Serverless containers with Fargate  © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless containers with Fargate Fargate runs tens of millions of containers for AWS customers every week Bring existing code Containers as first-class primitive Production ready No changes required of existing code, works with existing workflows and microservices built on Amazon ECS Time and event-based scheduling, network integration, individually metered, and billed. Native service discovery. ISO, PCI, HIPAA, SOC compliant. Launch tens or tens of thousands of containers in seconds in 9 global regions (+7 in 2018)
    • 37. Recent launches—Containers © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Recent launches—Containers Amazon ECS Secrets management Amazon ECS & Fargate Tagging & Cost Allocation Amazon EKS ALB Ingress Controller AWS App Mesh Preview (re:Invent launch) Amazon ECS Cloud Map Integration (re:Invent launch) CodeDeploy Amazon ECS Blue/Green Deployments (re:Invent launch) Amazon EKS Upgrades (re:Invent launch) Amazon ECS ARM Support (re:Invent launch) Rule Stack
    • 38. Coming soon for containers © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Coming soon for containers Fargate Secrets management Log drivers (Splunk, gelf, fluentd, syslog) PrivateLink support Amazon ECS PrivateLink Support ENI density improvements Multiple LBs per service Amazon ECR Tagging & cost allocation Image scanning Rule Stack Amazon EKS CloudWatch logs Service linked roles IAM roles for pods AWS App Mesh Public Beta
    • 39. How do we monitor and control all of these microservices? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do we monitor and control all of these microservices?
    • 40. Putting logic inside each microservice is complex © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Putting logic inside each microservice is complex Microservice Application Code Monitoring SDKs Routing logic Discovery logic Deployment logic
    • 41. Easier: Decouple operational logic and SDKs © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Easier: Decouple operational logic and SDKs Application code Microservice Proxy Logic for: Monitoring Routing Discovery Deployment
    • 42. Easily deliver configuration and receive data © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Easily deliver configuration and receive data Reporting Intent Proxy Microservice App developer Infra operator
    • 43. Accelerating Fargate and Lambda with Firecracker © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Accelerating Fargate and Lambda with Firecracker AWS is open sourcing Firecracker to enable broad access and innovation Security Speed by design Scale and efficiency
    • 44. Slide1690 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Changes to the delivery of software
    • 45. How do I develop and deploy code in a serverless microservices architecture? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I develop and deploy code in a serverless microservices architecture?
    • 46. Four serverless microservices FAQs for software delivery © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Four serverless microservices FAQs for software delivery How do I monitor ephemeral resources in a distributed architecture? How do I codify best practices? How do I author and debug Lambda applications? How do we manage the release process for so many services?
    • 47. Monolith development lifecycle © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith development lifecycle Monitor Release Test Build Developers Delivery pipelines Services
    • 48. Monolith development lifecycle © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith development lifecycle Monitor Release Test Build Developers Delivery pipelines Services
    • 49. Microservice development lifecycle © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservice development lifecycle Developers Delivery pipelines Services Monitor Release Test Build
    • 50. Microservice development lifecycle © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservice development lifecycle ??? Developers Delivery pipelines Services
    • 51. Microservice development lifecycle © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservice development lifecycle 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
    • 52. How Amazon does DevOps © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How Amazon does DevOps Automate everything Decompose for agility (microservices, 2 pizza teams) Standardized tools Infrastructure as code Belts and suspenders (governance, templates)
    • 53. We released the AWS Developer Tools for CI/CD © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. We released the AWS Developer Tools for CI/CD AWS CodeBuild + Third Party AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS X-Ray Source Build Test Deploy Monitor AWS CodePipeline
    • 54. AWS Developer Tools are focused on supporting containers and Lambda © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Developer Tools are focused on supporting containers and Lambda Support for Lambda deployment with AWS CodePipline and AWS CloudFormation Support for rolling and blue/green Lambda deployments with AWS CodeDeploy Support for Fargate and Amazon ECS deployments in AWS CodePipeline AWS CodePipeline supports Config for improved governance *New* AWS CodePipeline supports Amazon ECR as a source *New* Support for blue/green deployments for Fargate and Amazon ECS with AWS CodeDeploy 2016 2018 2017 NOV NOV DEC OCT NOV NOV
    • 55. How do I observe distributed and ephemeral applications? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I observe distributed and ephemeral applications? UI Monolithic architecture Microservices architecture Microservices Business logic Data access layer UI
    • 56. AWS X-Ray is built for modern applications © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS X-Ray is built for modern applications Analyze and debug issues quickly End-to-end view of individual services Identify customer impact Support for Serverless *New* X-Ray Root Causes *New* Support for API Gateway
    • 57. How do I edit and debug my serverless application code? © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I edit and debug my serverless application code?
    • 58. Author and debug Lambda applications on AWS using your favorite IDEs © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Author and debug Lambda applications on AWS using your favorite IDEs AWS Cloud9 Python, Node AWS Toolkit for PyCharm **New Today** Python AWS Toolkit for IntelliJ Developer Preview Java, Python AWS Toolkit for Visual Studio Code Developer Preview .NET, Node
    • 59. Slide1806 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    • 60. How can we best model and provision our infrastructure?  © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How can we best model and provision our infrastructure? Developer AWS CodeCommit AWS CodeBuild AWS CloudFormation Amazon SNS Amazon S3 bucket Source Pre-create tests Stack creation Post-create tests Manual approval Deployment Stack Stack Pre-create Create stacks Post-create Deploy AWS CodePipeline Region Region Region cfn-nag 2 4 6 1 3 5 2 4 6 1 3 5 AWS Stack
    • 61. AWS Cloud Development Kit (Amazon CDK) © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Developer Preview AWS Cloud Development Kit (Amazon CDK) AWS CDK application AWS CloudFormation template Stack(s) Construct Construct Resources AWS CloudFormation Amazon Simple Queue Service Lambda Amazon S3 bucket DynamoDB
    • 62. Application models simplify building serverless and containerized applications © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Application models simplify building serverless and containerized applications AWS Serverless Application Model (AWS SAM) Containers Constructs for CDK
    • 63. Slide1697 © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Conclusion
    • 64. We are building a cloud that best supports your modern application development needs, and we are innovating across the entire stack: From the hypervisor layer to the application construction layer. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. We are building a cloud that best supports your modern application development needs, and we are innovating across the entire stack: From the hypervisor layer to the application construction layer.
    • 65. Slide1646 Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. drr, Deepak, and Ken
    • 66. Slide1812 Please complete the session survey in the mobile app. ! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
    • 67. Slide3 AWS Pop-up Loft | Istanbul © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Please Complete Your Session Survey! Microservices on AWS: Architectural Patterns and Best Practices https://bit.ly/2kwV364