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

Serverless Anti-Patterns

2beed2c93172f950cc1d30293bcdb9ad?s=47 Ant Stanley
November 15, 2017

Serverless Anti-Patterns

Talk given at the Serverless London User Group on 15 November 2017. Focus on some serverless patterns that aren't event driven, decoupled microservices, but are very effective.

2beed2c93172f950cc1d30293bcdb9ad?s=128

Ant Stanley

November 15, 2017
Tweet

Transcript

  1. Serverless Anti-Patterns @IamStan

  2. @IamStan “Best Practice”

  3. https://medium.com/byteagenten/serverless-architecture-with-aws-adcaa3415acd @IamStan

  4. https://aws.amazon.com/blogs/aws/category/amazon-elasticsearch-service/ @IamStan

  5. https://www.oreilly.com/ideas/using-serverless-architectures-to-build-applications-with-aws-and-java @IamStan

  6. http://theburningmonk.com/2016/12/yubls-road-to-serverless-architecture-part-1/ @IamStan

  7. @IamStan

  8. @IamStan Serverless Design Patterns.. The Book!

  9. @IamStan Primitive Pattern: Periodical (Cron Job) Primitive Pattern: Messaging API

    Pattern: Wrapper/Proxy API Pattern: Facade API Pattern: Async Orchestration: One way chain Orchestration: Two way chain Orchestration: Fan out Orchestration: Fan in Pipes & Filters: Workflow and Long Running Pipes & Filters: Streams Traditional: Command Traditional: Singleton Serverless Design Patterns.. The Book!
  10. @IamStan Learning to Code Journey http://www.vikingcodeschool.com/posts/why-learning-to-code-is-so-damn-hard

  11. @IamStan Learning to Serverless Journey Deployed something into production Oh

    sh*t I need to maintain this thing Now I’m deploying servers to manage my serverless application I can never imagine doing it any other way Serverless is Lyf
  12. @IamStan How not to serverless!

  13. @IamStan The FaaSaaS Pattern (Function as a Service as a

    Server)
  14. @IamStan

  15. @IamStan FaaSaaS - GraphQL Edition https://serverless.zone/graphql-with-the-serverless-framework-79924829a8ca

  16. @IamStan FaaSaaS - GraphQL Edition https://github.com/serverless/serverless-graphql-apollo

  17. @IamStan FaaSaaS - GraphQL Edition > 40,000,000 visits per month

    ~ 5,000,000 visits per month
  18. @IamStan

  19. @IamStan FaaSaaS - Apex Up https://github.com/apex/up TJ Holowaychuk Apex Framework

    Express Mocha Koa 545 packages on NPM
  20. @IamStan FaaSaaS - Apex Up Makes your function act like

    a VPS Up CLI for easy deployment Up Golang Proxy inside function JSON -> HTML
  21. @IamStan FaaSaaS - Apex Up Runtimes: - Python - Golang

    - Node.js - Crystal - Static sites
  22. @IamStan FaaSaaS - Apex Up Up CLI abstracts away -

    Lambda - API Gateway - Route 53 - CloudTrail - CloudFront - ACM
  23. @IamStan FaaSaaS - Apex Up

  24. @IamStan

  25. @IamStan FaaSaaS - Zappa https://github.com/Miserlou/Zappa Rich Jones Founder gun.io NoDB

    S3SQLite Gone in 60 Seconds (Intrusion and Exfiltration in Serverless Architectures)
  26. @IamStan FaaSaaS - Zappa Python framework (supports 2.7 & 3.6)

    Works with any works with any WSGI*- compatible framework Includes Django, Flask, Pyramid, Bottle *WSGI = Web Server Gateway Interface
  27. @IamStan FaaSaaS - Zappa -VTL to map body, headers, method,

    params and query strings into JSON, and then turning that into valid WSGI -Attaching response codes to response bodies, Base64 encoding, using that as a regex to route the response code, decoding in VTL, then mapping the response body -Packing and Base58 encoding multiple cookies into a single cookie -Turning cookie-setting 301/302 responses into 200 responses with HTML redirects
  28. @IamStan FaaSaaS - Zappa Allows you to run your Python

    app in Lambda without any changes Allows you to run deploy decoupled Serverless Apps Broad support for AWS services (x-Ray, Cognito, SNS, etc) Up to date with AWS feature set (ie Dead Letter Queues)
  29. @IamStan The wrens are mostly small, brownish passerine birds in

    the mainly New World family Troglodytidae. ... Most wrens are small and rather inconspicuous, except for their loud and often complex songs. - Wikipedia
  30. I’m not too sure what to call it - PyWren

    @IamStan https://github.com/pywren/pywren RISE Lab Real-time Intelligent Secure Execution
  31. @IamStan I’m not too sure what to call it -

    PyWren
  32. I’m not too sure what to call it - PyWren

    @IamStan Streams your user code from S3 and hot loads it into Lambda Uses the Anaconda Python Runtime Can scale to your Lambda account concurrency limit Alternatively can use a single EC2 server
  33. @IamStan Thank you!

  34. @IamStan There is more than one way to Serverless!!