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

The Truth Behind Serverless DockerConEU'17

The Truth Behind Serverless DockerConEU'17

Lets take AWS Lambda apart, see how it works, and put it back together! Includes some gentle introduction to Lambda and serverless, and gets deep into the HOW of serverless.

Avatar for Erica Windisch

Erica Windisch

October 17, 2017

More Decks by Erica Windisch

Other Decks in Technology

Transcript

  1. Serverless
 Culture Don’t build, when you can buy. Build as

    little as necessary. Build with the minimum operational complexity. Maybe all you need are some circles
  2. @ewindisch @IOpipes The 12 Factor App I. Codebase One codebase

    tracked in revision control, many deploys II. Dependencies Explicitly declare and isolate dependencies III. Config Store config in the environment IV. Backing services Treat backing services as attached resources V. Build, release, run Strictly separate build and run stages VI. Processes Execute the app as one or more stateless processes VII. Port binding Export services via port binding VIII. Concurrency Scale out via the process model IX. Disposability Maximize robustness with fast startup and graceful shutdown X. Dev/prod parity Keep development, staging, and production as similar as possible XI. Logs Treat logs as event streams XII. Admin processes Run admin/management tasks as one-off processes
  3. @ewindisch @IOpipes Amazon’s “Serverless (functions) Manifesto” ✤ Function are the

    unit of deployment and scaling. ✤ No machines, VMs, or containers visible in the programming model. ✤ Permanent storage lives elsewhere. ✤ Scales per request; Users cannot over- or under-provision capacity. ✤ Never pay for idle (no cold servers/containers or their costs). ✤ Implicitly fault-tolerant because functions can run anywhere. ✤ BYOC - Bring Your Own Code. ✤ Metrics and logging are a universal right.
  4. @ewindisch @IOpipes Platforms - AWS Lambda - Azure Functions -

    Google Cloud Functions - Oracle’s fn() - IBM Bluemix Functions - OpenWhisk - Spring Functions - Galactic Fog - Stdlib - Now.sh - Auth0 Webtasks & Extend - AppEngine Classic - Heroku - Parse - Firebase - Google PubSub - Google BigQuery - AWS S3 - AWS SNS - AWS Athena - AWS Kinesis - AWS DynamoDB & more
  5. @ewindisch @IOpipes Platforms - FaaS providers - AWS Lambda -

    Azure Functions - Google Cloud Functions - Oracle’s fn() - IBM Bluemix Functions - OpenWhisk - Spring Functions - Galactic Fog - Stdlib - Now.sh - Auth0 Webtasks & Extend - AppEngine Classic - Heroku - Parse - Firebase - Google PubSub - Google BigQuery - AWS S3 - AWS SNS - AWS Athena - AWS Kinesis - AWS DynamoDB & more
  6. @ewindisch @IOpipes Platforms - Event sources - AWS Lambda -

    Azure Functions - Google Cloud Functions - Oracle’s fn() - IBM Bluemix Functions - OpenWhisk - Spring Functions - Galactic Fog - Stdlib - Now.sh - Auth0 Webtasks & Extend - AppEngine Classic - Heroku - Parse - Firebase - Google PubSub - Google BigQuery - AWS S3 - AWS SNS - AWS Athena - AWS Kinesis - AWS DynamoDB & more
  7. @ewindisch @IOpipes Amazon’s “Serverless (functions) Manifesto” ✤ Function are the

    unit of deployment and scaling. ✤ No machines, VMs, or containers visible in the programming model. ✤ Permanent storage lives elsewhere. ✤ Scales per request; Users cannot over- or under-provision capacity. ✤ Never pay for idle (no cold servers/containers or their costs). ✤ Implicitly fault-tolerant because functions can run anywhere. ✤ BYOC - Bring Your Own Code. ✤ Metrics and logging are a universal right.
  8. @ewindisch @IOpipes Triggers & Events - Invoke functions via API

    - Configure event source to function mappings
  9. @ewindisch @IOpipes Schedule Events are mapped to running containers first,

    Or new containers are spawned to process events.
  10. @ewindisch @IOpipes Invoke Synchronous HTTP API Container is spawned, if

    not existing. Existing container is unpaused, fed event, then paused.
  11. @ewindisch @IOpipes Garbage Collection - Reap containers when they're no

    longer active - Reap VMs when they’re no longer active
  12. @ewindisch @IOpipes Don’t build when you can buy (you probably

    shouldn’t build anything I just showed you!)