Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Serverless Architecture at iRobot

893 visualizaciones

Publicado el

Slides from a talk presented at Serverlessconf London on October 27th, 2016.

Publicado en: Ingeniería
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Serverless Architecture at iRobot

  1. 1. Serverless Architecture at iRobot Ben Kehoe, Cloud Robotics Research Scientist @ben11kehoe 2016-10-27
  2. 2. How and why did we choose serverless? Choosing serverless https://commons.wikimedia.org/wiki/File:Grasshopper_in_green_field.jpghttps://commons.wikimedia.org/wiki/File:Connochaetes_taurinus_-Wildebeest_crossing_river_-East_Africa.jpg @ben11kehoe
  3. 3. Monolithic/layered Microservices @ben11kehoe
  4. 4. Microservices @ben11kehoe
  5. 5. • Latency • Cost • Deployment • Discovery • Security @ben11kehoe
  6. 6. • Latency • Cost • Deployment • Discovery • Security @ben11kehoe
  7. 7. Latency & Cost @ben11kehoe
  8. 8. Latency & Cost https://www.prerender.cloud/lambda-latency @ben11kehoe
  9. 9. Latency & Cost @ben11kehoe
  10. 10. • Separation of concerns?? • Microservice SDKs – Well-separated code • Downside: instead of HTTP API hiding, say, DB schema, it’s now hidden in the SDK…on the client side – If I change the DB schema, I need to update the callers as well – Highly-coupled deployments • Bear with me Latency & Cost @ben11kehoe
  11. 11. • So: deployments of highly- coupled microservices • …this is a monolith • That’s ok! • Code is still well-separated • What does deployment look like? Latency & Cost @ben11kehoe
  12. 12. • Latency • Cost • Deployment • Discovery • Security @ben11kehoe
  13. 13. Deployment @ben11kehoe
  14. 14. • Latency • Cost • Deployment • Discovery • Security @ben11kehoe
  15. 15. Discovery Client 1 2 @ben11kehoe
  16. 16. Discovery Client 1 2 @ben11kehoe
  17. 17. Discovery Client @ben11kehoe
  18. 18. Discovery Client @ben11kehoe
  19. 19. • Latency • Cost • Deployment • Discovery • Security @ben11kehoe
  20. 20. Security Allow: dynamodb:GetItem @ben11kehoe
  21. 21. Security record.pop('SensitiveKey')Allow: execute-api:Invoke @ben11kehoe
  22. 22. • Microservices directly accessing each other’s resources • Red/black deployments • CloudFront (+WAF) in front of API Gateway @ben11kehoe • Latency • Cost • Deployment • Discovery • Security
  23. 23. Soapbox
  24. 24. • Serverless as an identity • Testing • What’s missing from providers Soapbox @ben11kehoe
  25. 25. 0 1 Soapbox How much effort is it to provision and scale? @ben11kehoe
  26. 26. • No need for complicated abstraction layer • Use SDK mocking – placebo, aws-mock, etc. – Microservice SDKs that just use the AWS SDK to talk to resources are now mocked for free Unit Testing @ben11kehoe
  27. 27. Integration Testing @ben11kehoe
  28. 28. • Lambda env vars • Service discovery (aaS?) • VPC endpoints • Automatic hash-based/ETag versioning of Lambda – Hash based purely on inputs so it’s predictable • Deployment What’s still missing? @ben11kehoe
  29. 29. Proxy Stages /red/v1/path/to/resource red /v1/path/to/resource black /v1/path/to/resource/black/v1/path/to/resource @ben11kehoe
  30. 30. Proxy Stages prod /prod/v1/path/to/resource red /v1/path/to/resource black /v1/path/to/resource @ben11kehoe
  31. 31. • Architecture: skip API Gateway between microservices – Lots of implications, pro and con – Primary driver for us is cost • Security: CloudFront WAF is possible for API Gateway – A little bit of a Rube Goldberg • Severless is a spectrum • Integration testing only on deployed systems • Providers should support better deployment models Conclusion @ben11kehoe
  32. 32. Questions?

×