Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Microservices Architectures on Amazon Web Services

13,223 views

Published on

Microservices architecture is a method of developing software applications as a suite of independently deployable, small, modular services. Learn how to leverage the security and automation of the Amazon Web Services platform, to build, maintain and operate a microservices environment.

Speaker: Adam Lynch, Sr. Technical Account Manager, Amazon Web Services

Published in: Technology

Microservices Architectures on Amazon Web Services

  1. 1. ©  2016,  Amazon  Web  Services,  Inc.  or  its  Affiliates.  All  rights  reserved. Adam  Lynch  – Snr.  Technical  Account  Manager Microservices  Architectures  on  AWS September  2016
  2. 2. Overview Challenges  of  Microservices Microservices  Patterns  on  AWS Demo
  3. 3. Microservices “Microservices  is  an  approach  to  application  development   in  which  a  large  application  is  built  as  a  suite  of  modular   services.  Each  module  supports  a  specific  business  goal   and  uses  a  simple,  well-­defined  interface  to  communicate   with  other  modules” http://searchsoa.techtarget.com/definition/microservices
  4. 4. Microservices? Related  Concepts • Service  Oriented  Architectures • API  First • Agile  Software  Development • Continuous  Delivery • DevOps
  5. 5. Benefits  of  Microservices   Speed • Faster  development  and  deployment
  6. 6. Benefits  of  Microservices   Speed • Faster  development  and  deployment Innovation • Autonomy  of  teams,  culture  of  change • Ownership  and  DevOps  culture
  7. 7. Benefits  of  Microservices   Speed • Faster  development  and  deployment Innovation • Autonomy  of  teams,  culture  of  change • Ownership  and  DevOps  culture Quality • Composability  and  reusability • More  maintainable  code • Better  scaling  and  optimisations • Failure  isolation  and  resiliency
  8. 8. Infrastructure  Concerns High  Availability Scalability Security Connectivity
  9. 9. Infrastructure  Concerns Monitoring  and   Alerting Logging Deployments High  Availability Scalability Security Connectivity
  10. 10. Microservices  Patterns  on  AWS
  11. 11. The  Traditional  Microservice Clients RDS HTTP REST EC2   Instance Auto  Scaling  Group AZ-­A AZ-­B Min  >  1 Elastic  Load   Balancing EC2   Instance AWS  Elastic   Beanstalk And  don’t  forget  … .
  12. 12. A  Typical  Microservice  Architecture  on  AWS Content   Delivery API Layer Application Layer Persistency Layer
  13. 13. A  Typical  Microservice  Architecture  on  AWS S3 CloudFront RDS ElastiCache EC2 Elastic  Load   Balancing EC2 Elastic  Load   Balancing Static   Content Content   Delivery API Layer Application Layer Persistency Layer Auto  Scaling   Group Auto  Scaling   Group
  14. 14. A  Typical  Microservice  Architecture  on  AWS S3 CloudFront RDS ElastiCache EC2 Application   Load   Balancing Static   Content Content   Delivery API Layer Application Layer Persistency Layer API   Gateway EC2  Container   Service Auto  Scaling   Group
  15. 15. A  Typical  Microservice  Architecture  on  AWS S3 CloudFront EC2 Application   Load   Balancing Static   Content Content   Delivery API Layer Application Layer Persistency Layer API   Gateway EC2  Container   Service Auto  Scaling   Group DynamoDB
  16. 16. “No  server  is  easier  to   manage  than  no  server” -­ Werner  Vogels (CTO,  Amazon.com) Image:  20081108  DDP  Werner_Vogels/Guido  van  Nispen/license
  17. 17. The  Goal  – Serverless S3 CloudFront Static   Content Content   Delivery API Layer Application Layer Persistency Layer API   Gateway DynamoDBAWS   Lambda
  18. 18. Then  You  Put  It  All  Together
  19. 19. The  Hybrid  Microservice API Amazon  API   GatewayClients HTTP REST Amazon   EC2 AWS Lambda Lambda   Blueprints Amazon  ECS Elastic  Load   Balancing
  20. 20. The  Micro-­Microservice API Clients Amazon  API   Gateway Free Amazon  API   Gateway Premium Amazon  API   Gateway Partner Amazon  API   Gateway Experimental Amazon   EC2 Amazon  ECS AWS Lambda Lambda   Blueprints
  21. 21. Don’t  Reinvent  the  Wheel Notification  system E-­Mail  component Search  engine Workflow  engine Queue Transcoding  system Monitoring  system Amazon   CloudSearch Amazon  SQSAmazon  SNS Amazon  Elastic   Transcoder Amazon  SWFAmazon  SES If  you  find  yourself  writing  your  own… …take  a  deep  breath  and  stop  it  now!
  22. 22. Managing  One  Microservice is  Straightforward Clients RDS HTTP REST EC2   Instance Auto  Scaling  Group AZ-­A AZ-­B Elastic  Load   Balancing EC2   Instance Amazon  API   Gateway
  23. 23. Managing  a  Fleet  can  be  a  Challenge
  24. 24. How  Can  AWS  Help?
  25. 25. Logging, Monitoring • Built-­in  Features   • Monitoring  via  CloudWatch • Logging:  CloudWatch Logs
  26. 26. Logging,  Monitoring • Publish externally  relevant  metrics • Latency • RPS • Error  rate • Understand internally  relevant  metrics • Basic  – CloudWatch • OS • Application
  27. 27. Logging,  Monitoring • Pick  a  common  log  aggregation  solution • Agree  on  log  entry  formats • Use  naming  conventions • Agree  on  correlation  strategy
  28. 28. Challenge:  Correlating  Requests ui-­svc catalog-­ svc checkout-­ svc shipping-­ svc payment-­ svc request
  29. 29. Use  Correlation  IDs 09-02-2015 15:03:24 ui-svc INFO [uuid-123] …… 09-02-2015 15:03:25 catalog-svc INFO [uuid-123] …… 09-02-2015 15:03:26 checkout-svc ERROR [uuid-123] …… 09-02-2015 15:03:27 payment-svc INFO [uuid-123] …… 09-02-2015 15:03:27 shipping-svc INFO [uuid-123] …… ui-­svc catalog-­ svc checkout-­ svc shipping-­ svc payment-­ svc request correlation  id:   “uuid-­123” correlation  id:   “uuid-­123”
  30. 30. Amazon CloudWatch Logs Amazon   ECS Amazon EC2 AWS Lambda Amazon Elasticsearch Kibana Real-­time  Dashboard Amazon  API   Gateway
  31. 31. Demo  1  – Real-­time  Dashboard
  32. 32. Amazon Redshift Amazon QuickSight Reporting  and  Analytics Amazon   EMR Amazon   ECS Amazon EC2 AWS Lambda Amazon  API   Gateway S3
  33. 33. Recap • Devops is  the  key  to  success • Set  standards  early • Log  everything  and  have  tooling  to  gain  insights • Don’t  reinvent  the  wheel
  34. 34. Thank  You!

×