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

Going Serverless with Go

Going Serverless with Go

As a representative of Episource, I shared some experience developing and deploying serverless applications with Go to Austin Go Language user group meetup. Everything presented was based on continuous learning from developing products for personal usage or at Episource during development sprints.

2b216fed040260b2370a995c92864615?s=128

Ivan Santos

February 19, 2020
Tweet

Transcript

  1. GOING SERVERLESS WITH GO

  2. IVAN SANTOS @PRAGMATICIVAN Episource - We’re hiring

  3. DISCLAIMER: WIP PRODUCT DEVELOPMENT

  4. SERVERLESS 101

  5. WHAT IS SERVERLESS COMPUTING?

  6. “SERVERLESS” WHERE IS THE SERVER?

  7. WHERE IS THAT AVAILABLE?

  8. FAAS EVENTS

  9. FUNCTION APPLICATION RUNTIME CONTAINER OS VIRTUALIZATION HARDWARE FUNCTION APPLICATION RUNTIME

    CONTAINER OS VIRTUALIZATION HARDWARE FUNCTION APPLICATION RUNTIME CONTAINER OS VIRTUALIZATION HARDWARE FUNCTION APPLICATION RUNTIME CONTAINER OS VIRTUALIZATION HARDWARE USER USER (SCALABLE UNIT) PROVIDER IAAS CAAS PAAS FAAS
  10. BENEFITS * Pay as you go * Lower costs *

    Single Purpose Functions * No server Management necessary * Auto-scaling * Turnaround (Market)
  11. PITFALLS Vendor lock-in Not built for long-running processes Performance may

    be affected (Cold Start)
  12. YOU ARE STILL MANAGING THAT K8S SERVER

  13. LIFECYCLE SO IF YOU HAVE 10 CONCURRENT EXECUTIONS OF THE

    SAME FUNCTION, YOU WILL HAVE 10 CONTAINERS, AND THEREFORE YOU WILL HAVE EXPERIENCED 10 COLD STARTS IN ORDER TO GET THERE. CREATED UPDATED CODE CHANGED IDLE FOR X MINS
  14. WHY GO? Faster bootstrap = smaller cold start

  15. “Serverless” may be a buzzword, but it's not an empty

    one. Less than five years since it launched, AWS Lambda has already been adopted by nearly half of companies with infrastructure in AWS. - datadoghq https://www.datadoghq.com/state-of-serverless/
  16. DEPLOYMENT FUNCTION Minimal IAM role Permissions

  17. ELEMENTS TO BUILD A BASIC WEB API

  18. APPLICATION EXAMPLE

  19. SERVERLESS FRAMEWORK

  20. OUT OF THE BOX 12 FACTOR & EVENT SOURCING

  21. MULTIPLE STAGES (ENVIRONMENT)

  22. DEVELOPER EXPERIENCE

  23. PLUGINS

  24. SERVERLESS OFFLINE

  25. INFRASTRUCTURE MANAGEMENT

  26. CD PIPELINE FRIENDLY (CANARY SUPPORT)

  27. USE CASES CRON TASK REST APIS EVENT BASED ARCHITECTURE CHATBOT

  28. PRODUCTION ▸ 1 million free requests per month. ▸ Was

    able to create and deploy api to multiple environments in 1-2 days. ▸ Easily configurable on CI tools as it has its own CLI.
  29. DEMO

  30. RECAP ▸ What’s serverless ▸ FAAS ▸ Lambda lifecycle ▸

    Serverless Framework ▸ Applying serverless in your architecture
  31. THANK YOU! QUESTIONS? Ivan Santos

  32. LINKS https://www.datadoghq.com/state-of-serverless/?ref=announcement-banner https://www.datadoghq.com/state-of-serverless https://serverless.com/ https://github.com/dherault/serverless-offline/issues/768 https://www.cloudflare.com/learning/serverless/why-use- serverless/ https://blog.travelex.io/from-containers-to-aws- lambda-23f712f9e925 https://unsplash.com/

    https://github.com/yunspace/serverless-golang/blob/master/ gopher.jpg