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

Serverless Architecture - PragueJS 30.6.2016

Serverless Architecture - PragueJS 30.6.2016

Serverless can also mean applications where some amount of server-side logic is still written by the application developer but Function as a Service, unlike traditional architectures is run in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a 3rd party.

Ladislav Prskavec

June 30, 2016
Tweet

More Decks by Ladislav Prskavec

Other Decks in Technology

Transcript

  1. Backend as a Service (BaaS) 4 Firebase - DB +

    Auth 4 Hoodie - Offline first, PouchDB 4 Algolia - Search 4 Auth0 - SSO, Token Based Auth 4 Kinvey - Mobile Backend as Service 4 Syncano - Assemble your backend PragueJS, 30.6.2016 5
  2. Function as a Service (FaaS) 4 Amazon Lambda & API

    Gateway (Nov'14) 4 IBM Bluemix Openwhisk (Feb'16) 4 Google Cloud Functions (Feb'16) 4 Azure Functions (Mar'16) 4 Webtask.io (Mar'15) PragueJS, 30.6.2016 6
  3. Amazon Lambda - Inputs 4 Event Source 4 API Gateway

    4 S3 4 Kinesis 4 DynamoDB 4 AWS Config 4 Amazon Cognito 4 AWS CloudFormation 4 ... PragueJS, 30.6.2016 8
  4. Amazon Lambda - Processing 4 Compute Service 4 Languages (NodeJS

    0.10 and 4.3, Java, Python) 4 Security Model (IAM, VPC) 4 Cascading 4 Run code at any scale 4 Charged on execution scale PragueJS, 30.6.2016 9
  5. Cost effective Scenario - 16k req/day @ 200ms avg =

    3200 s/day $2.97/day - 2 EC2 instances (upfront) $0.05/day - Lambda (1GB) PragueJS, 30.6.2016 11
  6. Apex - http://apex.run 4 in golang support nodejs, golang, python,

    java 4 optional terraform support 4 multiple deployment targets for different environments 4 idempotent deployments 4 author @tjholowaychuk PragueJS, 30.6.2016 13
  7. Serverless - http://www.serverless.com 4 in NodeJS support Javascript only 4

    Beta, still many changes, roadmap to 1.0 4 CloudFormation 4 Many Plugins PragueJS, 30.6.2016 14
  8. Zappa - https://zappa.gun.io 4 in Python support Python 4 https://github.com/Miserlou/lambda-packages

    4 https://github.com/Miserlou/django-zappa PragueJS, 30.6.2016 15
  9. Security 4 https://github.com/vandium-io/vandium-node 4 Powerful input validation, Forces values into

    correct types 4 JSON Web Token (JWT) verification and validation 4 Cross Site Request Forgery (XSRF) detection when using JWT 4 SQL Injection (SQLi) detection and protection 4 Environment variable mapping, 4 Free resources post handler execution 4 Handles uncaught exceptions 4 Promise support PragueJS, 30.6.2016 17
  10. Testing 4 https://github.com/lambci/docker-lambda/ 4 Docker images and test runners that

    replicate the live AWS Lambda environment 4 NodeJS 0.10/4.3 4 Python PragueJS, 30.6.2016 18
  11. Resources 4 https://aws.amazon.com/lambda/ 4 https://github.com/anaibol/awesome-serverless 4 https://cloudcraft.co 4 https://github.com/lambci/docker-lambda/ 4

    http://www.allthingsdistributed.com/2016/05/aws-lambda-serverless- reference-architectures.html 4 https://www.thoughtworks.com/radar/techniques/serverless-architecture 4 https://serifandsemaphore.io/azure-cloud-functions-vs-aws-lambda- caf8a90605dd#.dbk2yntw1 PragueJS, 30.6.2016 29