Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Randstad Docker meetup - Serverless

114 vues

Publié le

January 2019 - Utrecht

Publié dans : Logiciels
  • Soyez le premier à commenter

Randstad Docker meetup - Serverless

  1. 1. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Fn Project Randstad Docker meetup 1 David Delabassee - @delabassee Oracle January 30, 2019
  2. 2. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 2 Preamble…
  3. 3. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 3
  4. 4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 4
  5. 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Function As a Service • Function • As a Service 5 Small bits of code with a well defined job Easy to understand and maintain The system takes care of provisioning, patching, scaling, ... Each function can scale independently
  6. 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 6 https://jaxenter.com/technologies-dominate-2019-poll-152470.html
  7. 7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 7 https://twitter.com/monkchips/status/1088002995525242880
  8. 8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Coming Soon: Oracle Functions 8 Autonomous Platform auto-scales functions No servers to provision, manage Pay Per Use Pay for execution, not for idle time No Lock-in Built on open-source Fn Project and Docker Oracle Functions Functions-as-a-Service Oracle Cloud Integrated Container Native Multi-tenant Secure Open Source Engine
  9. 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. FaaS Platform – Roles & Responsibilities 9 Users Provider
  10. 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 10 Open-Source Container-Native FaaS Platform Introducing Fn Project https://github.com/fnproject
  11. 11. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. The Ideal FaaS Platform? Open-Source Approachable Container-Native Language Independent Scheduler Independent Platform Independent No vendor lock-in Easy for new users Leverage Docker and its ecosystem Go, Java, Python, … K8S, Swarm, Mesos, ... Cloud, On-Perm, laptop
  12. 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn Architecture • Fn CLI • Fn FDK's
  13. 13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Introducing Fn Function Code wrapped in a Container Image –Via a “wrapper” • Input from stdin • Output to stdout • Logs to stderr –Or simply use an FDK! Fn handles everything else!
  14. 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn and java 14
  15. 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn … not just Java 15 • Go • Python • Node • Ruby • … • bring your own! – Init-image
  16. 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. fn deploy 16 • Build container (multi-stage) + bumps version • Push container to registry (unless --local) • Create or update function trigger SomeFunc:0.0.1 SomeFunc:0.0.1 SomeFunc:0.0.1 User code Fn Service somefunc → /r/app/somefunc:0.0.1
  17. 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn Triggers 17 • Entry points for function invocation • Multiple triggers may call the same function • HTTP trigger, more coming $ fn init --runtime node --trigger http hello … $ fn list triggers nodeapp FUNCTION NAME TYPE SOURCE ENDPOINT hello my-trigger http /hi http://10.8.10.103/t/nodeapp/hello
  18. 18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Logging 18 syslog & logspout
  19. 19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn and Developers 19 • Strong Developer Focus – E.g. keep using your preferred tool chain • FDK • Fn CLI # fn init # fn build (optional) # fn deploy # fn invoke
  20. 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. DIY Serverless 20 • Roles & Responsibilities – Users and Provider • Why? – Don’t Lean into Lock-in, Open is Good, Flexibility is Great – Specific requirement, e.g. local legislation – More controls and customization – Learning, Development, etc.
  21. 21. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. DIY Serverless 21 • Requirements – Fn Project – Kubernetes – Infrastructure – DevOps Ninja Skills
  22. 22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. DIY Serverless 22 • Scheduler Agnostic – Optimizations and additional management work underway for K8S • Helm chart – https://github.com/fnproject/fn-helm
  23. 23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. DIY Serverless 23 • Requirements – Fn Project – Kubernetes – DevOps Ninja Skills Oracle Container Engine for Kubernetes
  24. 24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Observability and Analytics with Prometheus & Grafana 24
  25. 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Tracing with OpenTracing and Jaeger 25
  26. 26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Customizing and Extending Fn 26 • Listeners – App, Call, Fn and Trigger listeners – Can listen to various API events and respond to them • Middleware – Add functionality for every API request – Cancel the request or call the next middleware in the chain – E.g. Authentication middleware that checks headers for a custom token • Custom API endpoint – E.g. Custom API endpoint that handles requests to a custom HTTP route
  27. 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Low Latency • Hot Functions • Start Fast • Run Small(er) images 27
  28. 28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn Hot functions 28 • Cold start time (~300ms) is incurred on a first invocation • Fn will pause the container for a time, default 30s • Subsequent invocations will be “hot”, and reset the cooldown
  29. 29. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Start Fast 29 E.g. Java - Moving Startup Costs to Build-Time • Class Data Sharing –Avoid parsing JDK classes on start • Application CDS –Avoid parsing App classes on start • AOT compilation –Compile App classes to native .so libraries (experimental)
  30. 30. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Run Small(er) Images Small container images = faster start-up –Transferring images to a host –COW caches –Overlay FS 30 E.g. Java - Better start-up time
  31. 31. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Run Small(er) Images 31 Remove parts of Java standard library that you don't use Function and its dependencies Java runtime Operating System Java 11 vs. Java 11 with jlink
  32. 32. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Run Small(er) Images Security-oriented, lightweight Linux distribution with 4MB base image Lightweight, fast, simple, free, C standard library implementation 32 E.g. Java Project Portola’s goal is to run the JVM on Alpine Linux/Musl
  33. 33. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Run Small(er) Images • GraalVM compiles Java source to a single native binary • Tiny image sizes • Low VM overhead 33 E.g. Java
  34. 34. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Fn Project • Open Source Container Native FaaS Platform –https://github.com/fnproject • Development choices –Go, Java, Node, Python, etc. • Operation choices –DIY Serverless – ➥ Oracle Container Engine for Kubernetes + Fn –➥ FaaS, i.e. Oracle Functions (soon) 34 Wrap-up
  35. 35. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Coming Soon: Oracle Functions Function Dev KitsOpen Source Engine Oracle Cloud Triggers Events HTTP Timer Streams Container Native Advanced DiagnosticsFine-grained Billing
  36. 36. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 36 Dank u!
  37. 37. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. https://cloud.oracle.com/TryIt Get $500 USD of free credits

×