Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The FaaS and the Furious

199 views

Published on

Serverless Computing ist der nächste logische Schritt, um Anwendungen in die Cloud zu bringen. Im Kern von Amazons Serverless Computing Angebots liegt AWS Lambda. AWS Lambda ist unter anderem durch den Sprachassistenten Alexa populär geworden, wird aber in unterschiedlichen Bereichen für innovative Produkte verwendet. Dieser Vortrag stellt Serverless Computing anhand eines Amazon Alexa Skills vor, der das Konferenzprogramm der Devcon 2017 als Sprachassistent anbietet. Wir schauen im Rahmen des Beispiels auf die architekturellen und infrastrukturellen Herausforderungen diese Event-Driven Ansatzes und lernen, wo Serverless Computing sinnvoll ist und wo andere Ansätze besser geeignet sein können. Schliesslich werfen wir noch einen kurzen Blick auf Alternativen zu AWS Lambda und bewerten die Vor- und Nachteile.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

The FaaS and the Furious

  1. 1. @Koenighotze THE FAAS AND THE FURIOUS • Serverless computing (mostly) without marketing BS
  2. 2. @Koenighotze What is Serverless and why should I care? How does is work? Architectural impact Obviously a free lunch and a silver bullet Alternatives
  3. 3. @Koenighotze QUICK HISTORY OF THE CLOUD
  4. 4. @Koenighotze Ye olde days
  5. 5. @Koenighotze
  6. 6. @Koenighotze
  7. 7. @Koenighotze
  8. 8. @Koenighotze INFRASTRUCTURE AS A SERVICE
  9. 9. @Koenighotze
  10. 10. @Koenighotze PLATFORM AS A SERVICE
  11. 11. @Koenighotze
  12. 12. @Koenighotze CONTAINERS FTW
  13. 13. @Koenighotze
  14. 14. @Koenighotze Provisioning Scaling Monitoring Orchestration Security Deploying …
  15. 15. @Koenighotze
  16. 16. @Koenighotze
  17. 17. @Koenighotze
  18. 18. @Koenighotze Developers do not care about Docker
  19. 19. @Koenighotze Developers do not care about Kubernetes
  20. 20. @Koenighotze Developers do not care about Firewalls
  21. 21. @Koenighotze But designing a real system is hard
  22. 22. @Koenighotze HOW TO DRAW AN OWL?
  23. 23. @Koenighotze 1. Draw some circles 2. Draw the rest of the damn owl
  24. 24. @Koenighotze Sometimes circles are enough
  25. 25. @Koenighotze FAAS
  26. 26. @Koenighotze FUNCTION-AS-A- SERVICE
  27. 27. @Koenighotze Definition?
  28. 28. @Koenighotze On demand ephemeral compute power
  29. 29. @Koenighotze
  30. 30. @Koenighotze You cannot define something by saying what it isn’t
  31. 31. @Koenighotze Cloud Nativetm
  32. 32. @Koenighotze The 12 Factor App Manifesto
  33. 33. @Koenighotze Serverless encodes the 12 Factor App principles
  34. 34. @Koenighotze
  35. 35. @Koenighotze
  36. 36. @Koenighotze AWS LAMBDA IN A NUTSHELL
  37. 37. @Koenighotze What is a “function”?
  38. 38. @Koenighotze
  39. 39. @Koenighotze Event driven Stateless Asynchronous Single purpose
  40. 40. @Koenighotze
  41. 41. @Koenighotze
  42. 42. @Koenighotze JA, JAVASCRIPT… WIE AUF EINER PARTY WO ES NUR KÖLSCH GIBT
  43. 43. @Koenighotze How is it executed?
  44. 44. @Koenighotze
  45. 45. @Koenighotze
  46. 46. @Koenighotze exports.handler = (evt, ctx, callback) => { callback(null, "Hello World") }
  47. 47. @Koenighotze exports.handler = (evt, ctx, callback) => { callback(null, "Hello World") } <filebasename>.<function> index.handler
  48. 48. @Koenighotze exports.handler = (evt, ctx, callback) => { callback(null, "Hello World") }
  49. 49. @Koenighotze exports.handler = (evt, ctx, callback) => { callback(null, "Hello World") }
  50. 50. @Koenighotze What is its lifecycle?
  51. 51. @Koenighotze
  52. 52. @Koenighotze A TRIGGER!
  53. 53. @Koenighotze
  54. 54. @Koenighotze ANOTHER TRIGGER!
  55. 55. @Koenighotze
  56. 56. @Koenighotze Some time later…
  57. 57. @Koenighotze
  58. 58. DEMO @Koenighotze HELLO WORLD
  59. 59. @Koenighotze TESTING
  60. 60. @Koenighotze INTEGRATION TESTING
  61. 61. @Koenighotze AWS Serverless Application Model
  62. 62. @Koenighotze SAM local
  63. 63. @Koenighotze AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Hello World for Devcon Resources: HelloDevcon: Type: AWS::Serverless::Function Properties: Timeout: 5 Runtime: nodejs6.10 Handler: index.handler CodeUri: .
  64. 64. @Koenighotze AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Hello World for Devcon Resources: HelloDevcon: Type: AWS::Serverless::Function Properties: Timeout: 5 Runtime: nodejs6.10 Handler: index.handler CodeUri: .
  65. 65. @Koenighotze AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Hello World for Devcon Resources: HelloDevcon: Type: AWS::Serverless::Function Properties: Timeout: 5 Runtime: nodejs6.10 Handler: index.handler CodeUri: .
  66. 66. DEMO @Koenighotze TESTING WITH SAM
  67. 67. @Koenighotze SERVERLESS WEB APIS
  68. 68. @Koenighotze Enter the API Gateway
  69. 69. @Koenighotze
  70. 70. @Koenighotze
  71. 71. @Koenighotze
  72. 72. @Koenighotze
  73. 73. @Koenighotze
  74. 74. @Koenighotze Proxy integration
  75. 75. @Koenighotze
  76. 76. @Koenighotze callback(null, {body: JSON.stringify(…)}))
  77. 77. @Koenighotze callback(null, {body: JSON.stringify(…)}))
  78. 78. DEMO @Koenighotze HELLO WORLD REST
  79. 79. @Koenighotze TOOLS, FRAMEWORKS AND ALTERNATIVES
  80. 80. @Koenighotze
  81. 81. @Koenighotze
  82. 82. @Koenighotze
  83. 83. @Koenighotze
  84. 84. DEMO @Koenighotze LAMBDA API WITH CLAUDIA
  85. 85. @Koenighotze SERVERLESS ARCHITECTURES
  86. 86. @Koenighotze Operations glue Public traffic Mobile and IOT Backend Stream processing
  87. 87. @Koenighotze Conference serverless platform Alexa skill
  88. 88. @Koenighotze Serverless website
  89. 89. @Koenighotze http:!//dschmitz.devcon.ui.s3-website-eu-west-1.amazonaws.com/
  90. 90. @Koenighotze
  91. 91. @Koenighotze
  92. 92. @Koenighotze
  93. 93. @Koenighotze
  94. 94. @Koenighotze
  95. 95. @Koenighotze
  96. 96. @Koenighotze
  97. 97. @Koenighotze Alexa Devcon skill
  98. 98. @Koenighotze
  99. 99. @Koenighotze
  100. 100. @Koenighotze
  101. 101. @Koenighotze BEST PRACTICES
  102. 102. @Koenighotze COMMON PRACTICES
  103. 103. @Koenighotze Optimise for quick start
  104. 104. @Koenighotze Design for hot and cold start
  105. 105. @Koenighotze Embrace the platform
  106. 106. @Koenighotze Maybe embrace the platform
  107. 107. @Koenighotze Use different architectures
  108. 108. @Koenighotze Principle of least privileges
  109. 109. @Koenighotze Winter is here beware Spring
  110. 110. @Koenighotze SUMMARY
  111. 111. @Koenighotze This is not your fancy PaaS (sorry, adrian)
  112. 112. @Koenighotze Scale by request
  113. 113. @Koenighotze Charge by execution
  114. 114. @Koenighotze No more over- or under-provision
  115. 115. @Koenighotze FaaS Reduces upfront investment
  116. 116. @Koenighotze No more IPTable crap
  117. 117. @Koenighotze DevOps
  118. 118. @Koenighotze NoOps
  119. 119. @Koenighotze NoOps?
  120. 120. @Koenighotze DevOps right from the beginning
  121. 121. @Koenighotze But…
  122. 122. @Koenighotze Still immature tooling
  123. 123. @Koenighotze Vendor lock-in
  124. 124. @Koenighotze Complex billing
  125. 125. @Koenighotze Unikernels
  126. 126. @Koenighotze My VM is Lighter (and Safer) than your Container Filipe Manco NEC Laboratories Europe lipe.manco@gmail.com Costin Lupu Univ. Politehnica of Bucharest costin.lupu@cs.pub.ro Florian Schmidt NEC Laboratories Europe orian.schmidt@neclab.eu Jose Mendes NEC Laboratories Europe jose.mendes@neclab.eu Simon Kuenzer NEC Laboratories Europe simon.kuenzer@neclab.eu Sumit Sati NEC Laboratories Europe sati.vicky@gmail.com Kenichi Yasukata NEC Laboratories Europe kenichi.yasukata@neclab.eu Costin Raiciu Univ. Politehnica of Bucharest costin.raiciu@cs.pub.ro Felipe Huici NEC Laboratories Europe felipe.huici@neclab.eu ABSTRACT Containers are in great demand because they are lightweight when compared to virtual machines. On the downside, con- tainers oer weaker isolation than VMs, to the point where people run containers in virtual machines to achieve proper isolation. In this paper, we examine whether there is indeed a strict tradeo between isolation (VMs) and eciency (con- tainers). We nd that VMs can be as nimble as containers, as long as they are small and the toolstack is fast enough. We achieve lightweight VMs by using unikernels for spe- cialized applications and with Tinyx, a tool that enables creating tailor-made, trimmed-down Linux virtual machines. By themselves, lightweight virtual machines are not enough to ensure good performance since the virtualization control plane (the toolstack) becomes the performance bottleneck. We present LightVM, a new virtualization solution based on Xen that is optimized to oer fast boot-times regardless of the number of active VMs. LightVM features a complete redesign of Xen’s control plane, transforming its centralized operation to a distributed one where interactions with the hypervisor are reduced to a minimum. LightVM can boot a CCS CONCEPTS • Software and its engineering → Virtual machines; Operating Systems; KEYWORDS Virtualization, unikernels, specialization, operating systems, Xen, containers, hypervisor, virtual machine. ACM Reference Format: Filipe Manco, Costin Lupu, Florian Schmidt, Jose Mendes, Simon Kuenzer, Sumit Sati, Kenichi Yasukata, Costin Raiciu, and Felipe Huici. 2017. My VM is Lighter (and Safer) than your Container. In Proceedings of SOSP ’17: ACM SIGOPS 26th Symposium on Operating Systems Principles, Shanghai, China, October 28, 2017 (SOSP ’17), 16 pages. https://doi.org/10.1145/3132747.3132763 1 INTRODUCTION Lightweight virtualization technologies such as Docker [6] and LXC [25] are gaining enormous traction. Google, for instance, is reported to run all of its services in containers [4], and Container as a Service (CaaS) products are available
  127. 127. @Koenighotze Beware leaking abstractions
  128. 128. @Koenighotze Focus on what matters avoid distraction
  129. 129. @Koenighotze Hype train!
  130. 130. @Koenighotze THANK YOU! https:!//github.com/koenighotze/devcon-serverless-demo

×